title: MySQL query broke after adding join
body: <p>I have a query that loads data for a loop in my CMS to display posts. Everything was working fine in the vote columns until I left-joined the comment column. Comments display OK, but the totalvote, upvote and downvote counts are wildly off. Let me know if you need to see the tables.</p>
  
  <pre><code>SELECT
  count(DISTINCT comment.comment ) AS Comment,
  idea.dateofcreation AS timestamp, 
  idea.userId AS userId,
  idea.id AS ID,
  idea.text AS Idea,
  page.permalink AS Permalink,
  user.name AS Username,
  COUNT(CASE WHEN votelog.vote !="" THEN 1 END) AS 'totalvotes',
  COUNT(CASE WHEN votelog.vote = '1' THEN 1 END) AS 'upvote',
  COUNT(CASE WHEN votelog.vote = '-1' THEN 1 END) AS 'downvote'
  FROM idea
  LEFT JOIN votelog ON idea.id = votelog.ideaid
  LEFT JOIN user ON idea.userId = user.id
  LEFT JOIN page ON idea.id = page.ideaid
  LEFT join comment ON comment.ideaid = idea.id 
  GROUP BY idea.id
  ORDER BY totalvotes DESC
  </code></pre>