I want to run a query that eliminates duplicate rows based on colA and colB values. However, I still want to return the values ββof colC and colD.
Here is a simple example of what I have so far:
SELECT DISTINCT colA, colB ?colC, colD? FROM TABLE1
or
SELECT colA, colB ?colC, colD? FROM TABLE1 GROUP BY colA, colB
Any of the methods does not allow me to return colC and colD unless I check them as different values ββor groups, such as colA and colB. I do not want to do this, only colA and colB should be different together, not colC and colD. I just want to get them back.
Any ideas on how I can do this?
source share