Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT COUNT(result_answerid) AS MAX,(SUM(result_answer_iscorrect)/2) AS score FROM (SELECT * FROM ph_results_answers WHERE questionid IN (SELECT questionid FROM ph_tests_questions WHERE testid=28) AND resultid=250 ) a INNER JOIN ph_questions b ON a.questionid = b.questionid WHERE question_diff = 3
- UNION ALL
- SELECT COUNT(result_answerid) AS ABC ,(SUM(result_answer_iscorrect)/2) AS CDE FROM (SELECT * FROM ph_results_answers WHERE questionid IN (SELECT questionid FROM ph_tests_questions WHERE testid=28) AND resultid=250 ) a INNER JOIN ph_questions b ON a.questionid = b.questionid WHERE question_diff = 2 OR question_diff = 1
- MAX score
- 1 1.0000
- 3 2.0000
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement