如何返回显示 0 个响应的行?此查询返回 4 个 ID 中的 3 个和响应数,但 ID 3 没有显示,因为它有 0 个响应。我希望它显示为 0。
SELECT Count(sr.id) AS 'Responses',
qpa.possibleanswertext,
qpa.id
FROM caresplusparticipantsurvey.questionpossibleanswer AS qpa
JOIN caresplusparticipantsurvey.surveyresponse AS sr
ON qpa.id = sr.questionpossibleanswerid
WHERE ( qpa.id BETWEEN 1 AND 4 )
AND ( sr.surveyid IN (SELECT surveyid
FROM caresplusparticipantsurvey.surveyresponse AS
sr
WHERE sr.questionpossibleanswerid = 138) )
GROUP BY qpa.possibleanswertext,
qpa.id
99 Very Useful 1
26 Somewhat useful 2
33 I did not complete this CORE requirement this year 4