title: Return 0 for NULL values in a simple count and group by date
body: <p>I'm doing a simple count query for an SSRS chart, and while it looks like a common question, I've not really found an answer that suits my situation. This is my query:</p>
  
  <pre class="lang-sql prettyprint-override"><code>SELECT TOP 30       CAST(qa.Created As Date) As 'Date',
                      COUNT(qa.Created) As 'Count'
  FROM                QAs qa
  GROUP BY            CAST(qa.Created As Date)
  ORDER BY            'Date' DESC
  </code></pre>
  
  <p>This returns something like:</p>
  
  <pre class="lang-none prettyprint-override"><code>Date       | Count
  
  2014-11-10 | 2
  
  2014-11-08 | 3
  
  2014-11-07 | 8
  </code></pre>
  
  <p>Which when put into a line chart, doesn't show the dip down to 0 on the 9th and is a bit confusing for my users. What I want to do is have all of the last 30 days appear in order, even if they are at 0. I've been told to do this with <code>COALESCE()</code> but I can't seem to get that working either. Where am I going wrong?</p>