title: MySQL Double count on left join
body: <h2>Database Structure</h2>
  <pre><code>CREATE TABLE installs(
      id INT, PRIMARY KEY(id), 
      created DATETIME)
  
  CREATE TABLE uninstalls(
      id INT, PRIMARY KEY(id),
      created DATETIME,
      install_id INT)
  </code></pre>
  <h2>The Query (&quot;Me vs. The MySQL&quot;)</h2>
  <pre><code>SELECT DATE(installs.created),
    COUNT(installs.id),
    COUNT(uninstall.id)
  FROM installs
  LEFT JOIN uninstalls ON uninstalls.install_id = installs.id
  GROUP BY DATE(installs.created)
  </code></pre>
  <h2>The &quot;Expected&quot; Output</h2>
  <pre><code>DATE(installs.created) | COUNT(installs.id) | COUNT(uninstalls.id) 
    2012-11-20           | *installs on date* | *uninstalls on date*
  </code></pre>
  <p>So - I am looking a row per day, with the number of installs/uninstalls that happened on that day.</p>
  <h2>The Problem</h2>
  <p>The data for the 'installs' is correct for each day. BUT the data for the 'uninstalls' for each day is sadly incorrect.</p>