Quantcast
Channel: Teradata Forums - Database
Viewing all articles
Browse latest Browse all 14773

Selecting groups whose member belongs to multiple groups - response (4) by pavan.polish

$
0
0

Hi All,
I got some additional requirement as below:
I have data like below with Group ID and Member ID. I want to extract both Group ID and Member ID details for which a member belongs to more than one group.
 
For Eg:-
Input:-
Group ID Member ID
A  A
A  B
A  C
A  D
X  X
X  D
X  Y
X  Z
M  M
M  N
M  O
P  P
P  Q
Expected Output:-
Group ID Member ID
A  D
X  D
Here Member "D" belongs to both the groups and hence both groups are present in the output. The groups with Group ID M and P are not considered in the output as all members belongs to single group only.
Thanks a lot in advance.
Sagar.


Viewing all articles
Browse latest Browse all 14773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>