I am looking for the most efficient way to do the following.
I have up to 10 different CodeID's that can be associated one or many times to an ID. I need to identify ID's that have 2 or more instances of the same CodeID. In the sample below ID 1 should be identified as it has two instances of CodeID 50.
ID CodeID
1 123
1 24
1 50
1 102
1 24
1 18
2 50
2 123
2 24
I have up to 10 different CodeID's that can be associated one or many times to an ID. I need to identify ID's that have 2 or more instances of the same CodeID. In the sample below ID 1 should be identified as it has two instances of CodeID 50.
ID CodeID
1 123
1 24
1 50
1 102
1 24
1 18
2 50
2 123
2 24