Created
April 7, 2014 19:01
-
-
Save mamontov-cpp/10031005 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
`qa`.id as id, | |
utg.`grade` as grade, | |
`qa`.`rightanswer` as correctanswer, | |
`qa`.`responsesummary` as `comparedanswer` | |
FROM | |
`quiz_attempts` qua, | |
`quiz`, | |
`user` u, | |
`usernames_to_grades` utg, | |
`question_attempts` qa | |
WHERE | |
qua.quiz = `quiz`.id | |
AND qua.`userid` NOT IN (456, 261, 3992, 5192, 5214, 5276, 3988, 5186, 5307, 5229) | |
AND u.id = qua.`userid` | |
AND utg.firstname = LOWER(u.firstname) | |
AND utg.lastname = LOWER(u.lastname) | |
AND `quiz`.`name` LIKE '%Correct%'; | |
AND qa.questionusageid = qua.uniqueid, | |
AND qa.responsesummary != "" | |
LIMIT 0, 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment