title: MySQL Sum of Every Day
body: <p>This is related to a post at this link:</p>
  
  <p><a href="https://stackoverflow.com/questions/14049729/mysql-sum-of-every-day">MySQL : sum of every day</a></p>
  
  <pre><code>datetime (datetime)  count (int)
  2012-12-27 09:22:15    5
  2012-12-27 18:20:15    4
  2012-12-27 23:19:15    3
  2012-12-26 13:45:15    8
  2012-12-26 04:56:15    7
  2012-12-25 01:50:15    2
  2012-12-25 12:02:15    1
  </code></pre>
  
  <p>I would like to sum the COUNT of everyday, but not only for those days where there is entry, but also those days where there is no entry.</p>
  
  <pre><code>SELECT    DATE(datetime) as DATE, SUM(`count`) totalCOunt
  FROM      tableName
  GROUP BY  DATE(datetime)
  </code></pre>
  
  <p>Code above only returns me those days where there is entry.</p>
  
  <p>Say I want to get every day total of count between month of April 2016 through February 2017, how would I do it? Thanks. Example:</p>
  
  <pre><code>2012-12-25     25
  2012-12-26     NULL --&gt; because there is no entry
  </code></pre>