I have a set of data that resembles the following format.
GROUP | ELEMENT --------------- 1 | A 1 | B 1 | C 2 | A 3 | B 4 | A 4 | B 5 | A 5 | C
I'd like to be able to verify that both elements A AND B exist in each of the groups. Ideally I would return only those groups that have both elements. In the example above I would like to return only GROUP 1 and GROUP 4.
EDIT:
Sorry I should have not implied that 'A' and 'B' were the only options. Is it possible to look specifically for the existence of specific values such as 'A' and 'B'? There may be other possible values. I have updated the example data to reflect this.