Oracle to Teradata query conversion

General
N/A

Oracle to Teradata query conversion

Can anyone help me in conversting below oracle query part  into Teradata.

COUNT (DISTINCT (

case when column1 in ('aaa' , 'bbb')

 and column2 is null then column3

end )) OVER ( partition by some_col, some_col)

Thanks so much.

1 REPLY
Enthusiast

Re: Oracle to Teradata query conversion

Hi,

A quick look at the code, I can see that when you remove distinct, it works. Now since you may land up without distinct( i.e duplicates), then you can think of putting this in a derived query and then take only the distinct results.

You can verify with data.

Cheers,

Raja