Hello,
The code below is part of a query. I seem to have the format wrong for the part of the code that says AND ON C2.loginid = S2.loginid
. What format should I use?
Thanks in advance,
John
LEFT JOIN (
SELECT S2.loginid, COUNT(1) AS total
FROM submission S2
INNER JOIN comment C2
ON C2.submissionid = S2.submissionid
AND ON C2.loginid = S2.loginid
GROUP BY S2.loginid
) scs ON scs.loginid = l.loginid