Quantcast
Viewing all articles
Browse latest Browse all 4

T-SQL Question

Hello All,

I have table which has these columns

order_dt         source_type     co2

12-31-2018     abc                 50

12-31-2018     cde                 30

12-31-2018     xyz                 52

12-30-2018      abc                45

12-30-2018       cde                NULL

12-29-2018        xyz               NULL

I need to find the distinct source_type where co2 is not null for order_dt = 12-31-2018 and NULL for 12-29-2018 and 12-30-2018. So, my output should be

Source_type

cde

xyz

could someone please help me with this request?

Appreciate your help!!

Thank you


Viewing all articles
Browse latest Browse all 4

Trending Articles