title: Format for query condition
body: <p>The code below is part of a query.  I seem to have the format wrong for the part of the code that says <code>AND ON C2.loginid = S2.loginid</code>.  What format should I use?</p>
  
  <p>Thanks in advance,</p>
  
  <p>John</p>
  
  <pre><code>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
  </code></pre>