I have below Table, Need to exract those records where Same Value is associated with more than one different GroupId. If the same value is being duplicated under same GroupId then don't need to fetch that.
GroupId Value
11 AAA
11 AAA
11 BBB
22 AAA
22 CCC
22 CCC
33 AAA
33 DDD
33 BBB
I have tried it with Count(*)
with Having Count(*)>1
but nothing giving me the desired Output
The Output I need as below, where it tells the same Value is associated with different GroupId
. Here if the same value is being duplicated in same GroupId
I am not concerned about that. I just need those values which are available in more than one GroupId
.
Desired OutPut-
Column Value GroupId
1 AAA 11
1 AAA 22
1 AAA 33
2 BBB 22
2 BBB 33