Work around for Count distinct using Partition by

Database

Work around for Count distinct using Partition by

Hi, 

I realize you can't do a count distinct with partition by so I'm looking for a workaround. How do I combine the 2 tables to give me the result table? Thank you!

Table 1            Table 2             Result          
PNR AAA PNR Orig PNR AAA Orig (count distinct Orig
AB 1a AB IAH AB 1a 2
AB 2a AB IAD AB 2a 2
Tags (1)