Created
June 14, 2018 21:16
-
-
Save adatta02/83c04ba40e79724bee6a62d65fe87f83 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Count(*) AS cnt | |
FROM user_study | |
LEFT JOIN user_question | |
ON user_question.user_study_id = :user_study_id | |
AND user_question.question_group_id = '673' | |
AND user_question.id = (SELECT MAX(id) FROM user_question WHERE question_group_id = 673 AND user_study_id = :user_study_id) | |
LEFT JOIN user_question_response | |
ON user_question_response.user_question_id = user_question.id | |
AND user_question_response.question_id = '6118' | |
WHERE user_study.id = :user_study_id | |
AND ( user_question_response.question_answer_id = '37432' ) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment