I have a table like the following:
id letter number
1 A 1
2 A 2
3 A 3
4 B 1
5 C 1
6 C 2
I need to count the number of id's where the letter A has a number 1 OR 2. That's the easy one, and I got it. But now I need to count id's where the letter A has a number 1 AND a number 2, etc. Then the same for each letter. So I would get:
letter count
A 3
C 2
I dont care about B since the count would be 1. Thanks.