I have a table of answers with column fields like:
questionID,answer,email
row1: questionID = 'q1', answer = 'Male', email = 'fake@fake.com'
row2: questionID = 'q2', answer = 'Human',email = 'fake@fake.com'
I want to have a select statement like this:
SELECT email
FROM answers
WHERE (questionID='q1' AND answer='Male')
AND (questionID='q2' AND answer='Human')
So in other words, I want to the email of all of the people that are male, and human. The thing is each ‘answer’ is a new row so this query does not work. Is there a way to do this easily? Thanks!
1 Answer