Skip to content
Advertisement

duplicate records in table in SQL with two same column values and one different value

I am having three fields and I want to find out unique records with same c3 and c1 and different c2.

My c1, c2 and c3 are column names. I need to find out with in the same c1 and c3 where is c2 different.

eg.

My output reqd is from A10 group as C3 is duplicated

so I need:

from A20 group both should appear as C3 is same and C2 is different.

and from A50 and A60 nothing should in the output as either they are unique or duplicated.

Final output is :

I tried to find out duplicate C3 and applied various joins but not able to get the required results.

Advertisement

Answer

This should give you what you need:

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