title: I want to count how many requests were cancelled per month
body: <p>And show them as a total for each month.  I use the following script</p>
  
  <pre><code>SELECT datepart(yy,j.CompletedAt) as 'YY',  
         str(datepart(MM, j.CompletedAt),2) as 'MM', 
         Datename(MM,j.CompletedAt) as 'Month', 
         count('MM') as 'PMInMonth'
  FROM facts_reactive.dbo.jobs j 
  WHERE (
         (J.Reactive = -1)     
           AND datepart(yy,j.CompletedAt) = ' 2013'
           AND j.jobstatus = 6
         )
  GROUP BY datepart(yy,j.CompletedAt),  
           str(datepart(MM, j.CompletedAt),2), 
           Datename(MM,j.CompletedAt)
  ORDER BY datepart(yy,j.CompletedAt) ASC,  
           str(datepart(MM, j.CompletedAt),2) ASC;
  </code></pre>
  
  <p>However, if there were no jobs cancelled in the month it does not return anything; whereas I would like the month and 0 returned as the number of cancelled jobs.</p>
  
  <p>Is this possible?</p>
  
  <p>Many thanks in advance.</p>
  
  <p>Rob</p>