title: Group count results by date between two tables in mysql
body: <p>I have 2 different tables, users and votes. I would like to get a query to count total users and total votes (not sum) by date.
  <strong>users</strong></p>
  
  <pre><code>id | created_at
  </code></pre>
  
  <p><strong>votes</strong></p>
  
  <pre><code>id | created_at
  </code></pre>
  
  <p>I want the result to look like this:</p>
  
  <pre><code>date       | total users | total votes
  2012-06-01 | 50          | 90
  2012-06-01 | 23          | 0*
  2012-06-01 | 80          | 12
  </code></pre>
  
  <p>*It should take into account that on some days no votes were made</p>
  
  <p>I know how to make the 2 separate queries </p>
  
  <pre><code>SELECT DATE(created_at), count(id)
  FROM vote
  GROUP by DATE(created_at)
  ORDER by DATE(created_at) DESC
  </code></pre>
  
  <p>but I don't know how to join them. </p>