I've been playing with this for awhile and can't achieve the desired
results. I have seen messages with similar requests, but nothing that quite
matches my need.
I have the following query which counts the casestatusid's found in table
cases if the associated caseid is found in either casespecialty or
examspecialty and the uid equals 17.
I need casestatusid counts without any matches to return 0.
When RIGHT JOINing casespecialty OR examspecialty the query works as
desired. For example:
SELECT DISTINCT Count(c.casestatusid) AS statuscount, css.casestatusid AS
FROM casestatus css
LEFT JOIN cases c ON c.casestatusid = css.casestatusid