title: SQL GROUP BY with "default values"
body: <p>I'm trying to create <code>SELECT</code> statement with a <code>GROUP BY</code> clause, which should return "default values".</p>
  
  <p>Imagine the following simple MySQL table:</p>
  
  <pre><code>CREATE TABLE `tracker` (
    `id` INTEGER PRIMARY KEY auto_increment,
    `date` DATETIME NOT NULL,
    `customer_id` INTEGER NOT NULL
  );
  </code></pre>
  
  <p>The table contains only one record:</p>
  
  <pre><code>INSERT INTO `tracker` (`date`, `customer_id`) VALUES('2010-05-03', 1);
  </code></pre>
  
  <p>After wards I'm executing the following SQL query:</p>
  
  <pre><code>SELECT DATE(`date`), COUNT(customer_id) FROM tracker
  WHERE DATE(`date`) &gt;= '2010-05-01' AND DATE(`date`) &lt;= '2010-05-05'
  GROUP BY DATE(`date`) ORDER BY DATE(`date`);
  </code></pre>
  
  <p>And get the expected result set:</p>
  
  <pre><code>+----+---------------------+-------------+
  | id | date                | customer_id |
  +----+---------------------+-------------+
  |  1 | 2010-05-10 00:00:00 |           1 |
  +----+---------------------+-------------+
  </code></pre>
  
  <p>However, I would like the result set to look like this:</p>
  
  <pre><code>+--------------+--------------------+
  | DATE(`date`) | COUNT(customer_id) |
  +--------------+--------------------+
  | 2010-05-01   |                  0 |
  | 2010-05-02   |                  0 |
  | 2010-05-03   |                  1 |
  | 2010-05-04   |                  0 |
  | 2010-05-05   |                  0 |
  +--------------+--------------------+
  </code></pre>
  
  <p>Is it possible to achieve this behavior?</p>