I have a bunch of survey results in a database table, about 10,000 right
now. I'd like to know how many answered 'yes' and how many answered 'no'
to a particular question.
I could query the database twice with...
SELECT Count(QuestionID) as YesCount FROM SurveyAnswers WHERE
QuestionID='12' AND Answer='yes'
SELECT Count(QuestionID) as NoCount FROM SurveyAnswers WHERE
QuestionID='12' AND Answer='no'
....respectively, but is there a way to get both these totals in one query?
I'm using MySQL 4.1.10a