I have a dataset 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 would like to make sure that both A AND B elements exist in each of the groups. Ideally, I would only return groups that have both elements. In the above example, I would like to return only GROUP 1 and GROUP 4.
EDIT:
Sorry, I shouldn't have meant that “A” and “B” were the only options. Is it possible to look specifically at the existence of certain meanings, such as "A" and "B"? There may be other possible values. I updated the sample data to reflect this.