I have a table with lots of columns and from that table I've selected 2 columns of data which can be seen below.
The 2 columns are:
user_email and letter
user_email contains every person's email address and letter column contains a value which is either A or B. Each person's email can appear in any number of rows.
example: table_X
Code:
bob@hotmail.com, B
bob@hotmail.com, B
bob@hotmail.com, A
chris@hotmail.com, A
chris@hotmail.com, A
sue@hotmail.com, B
jess@yahoo.com, A
jess@yahoo.com, A
jess@yahoo.com, A
jess@yahoo.com, B
I'm trying to find out 3 different values, the number of users (I assume using COUNT) who:
- Have both A and B
- Have Only B
- Have Only A
This one's stumped me. Any ideas?
Bookmarks