Need a query to check(Select) if every combination of Value in colA and B has a unique value in col C. Please help. Thank you
This is the query I tried which doesn't give me the desired result:
select unique CONCAT(A,B),C
from tab1
group by CONCAT(A,B),C
having count(distinct (CONCAT(A,B)))>1;
Sample table:
A B C
Tim 123 1
Jill 123 1
Jill 456 2
John 456 1
Jill 456 1
Here row 3 and 5 with same values in col A and B have different values in col C which is incorrect. I need to select those