title: Group by day and still show days without rows?
body: <p>I have a log table with a date field called logTime. I need to show the number of rows within a date range and the number of records per day. The issue is that i still want to show days that <strong>do not have records</strong>.</p>
  
  <p>Is it possible to do this only with SQL?</p>
  
  <p>Example:</p>
  
  <p><code>
  SELECT logTime, COUNT(*) FROM logs WHERE logTime >= '2011-02-01' AND logTime &lt;= '2011-02-04' GROUP BY DATE(logTime);
  </code></p>
  
  <p>It returns something like this:</p>
  
  <pre>
  +---------------------+----------+
  | logTime             | COUNT(*) |
  +---------------------+----------+
  | 2011-02-01          |        2 |
  | 2011-02-02          |        1 |
  | 2011-02-04          |        5 |
  +---------------------+----------+
  3 rows in set (0,00 sec)
  </pre>
  
  <p>I would like to show the day 2011-02-03 too.</p>