Skip to content

Instantly share code, notes, and snippets.

@rodriguezd
Created June 6, 2013 01:48
Show Gist options
  • Save rodriguezd/5718740 to your computer and use it in GitHub Desktop.
Save rodriguezd/5718740 to your computer and use it in GitHub Desktop.
SELECT COUNT(*)
FROM answer, choice, question
WHERE(
answer.user_id = 1 AND
question.quiz_id = 1 AND
question.question_id = answer.question_id AND
choice.question_id = answer.question_id AND
choice.choice_id = answer.choice_id AND
choice.choice_correctness = 1
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment