回答が 0 件の行を返すにはどうすればよいですか? このクエリは 4 つの ID のうち 3 つと応答数を返しますが、応答が 0 であるため ID 3 は表示されません。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