Skip to content
Advertisement

For each distinct PK I have a mixture of TRUE/FALSE

If a PK has one YES value, I want all the other values to be YES. I am thinking going a CTE route that I join back in but was wondering if there is an easier way!

I am trying to get my table to look like this if only one Y is in the table above.:

Advertisement

Answer

I strongly recommend window functions if you just want a SELECT:

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement