I have a database of questions and answers. In the answers a specific question will save a yes / no entry to the database.
So, my table has an answer column that will have a yes or no value.
I want to be able to count how many times yes is stored and how many times no is stored.
Therefore, I could do this using two queries, for example:
SELECT COUNT(*) WHERE answer="yes";
SELECT COUNT(*) WHERE answer="no";
Is there a way to do this in a single request?
thank
source
share