I am looking to find the count of rows where the entered answer is the same as the correct answer. Here's an example:
WorkerID Answer Correct
1 A A
1 B C
2 A D
I would then get the following result:
WorkerID AnswerCount # Correct
1 2 1
2 1 0
So far I have (conceptually):
SELECT worker_id, count(*), count(Answer == Correct) FROM answer_table GROUP BY WorkerID
What would be the correct query here?
WHERE (Answer = Correct) AND (your other criteria....).