I have a table with multiple columns and want to find only those where a combination of A and B is distinct.
There may be several such rows and I want to get every field of the row for each distinct combination of A and B (let’s say there are also columns C and D).
Clarification:
I want to say something like
for each distinct A/B combination
get C and D
This sounds like it should be solved using a GROUP BY but could also possibly be a UNION as specified by this question:
Select distinct from multiple fields using sql