title: Query last 6 month of data , display by month name
body: <p>I want to get the last 6 month count records, and show it per month. I need to show 0 in case that month doesn't have any records.</p>
  
  <p>My query is</p>
  
  <pre><code>DECLARE @Date1 DATETIME, @Date2 DATETIME
  SET @Date1 = GETDATE()
  SET @Date2 = DateAdd(month, -6, Convert(CHAR(10), @Date1, 121))
  
  SELECT 
      DATENAME(MONTH,IssueDate) [Month Name], COUNT(1) [Count]
  FROM 
      CompetitiveProcess
  WHERE 
      IssueDate BETWEEN @Date2 AND @Date1
  GROUP BY 
      YEAR(IssueDate), MONTH(IssueDate), DATENAME(MONTH, IssueDate)
  </code></pre>
  
  <p>But is not showing the month that doesn't have any rows. Can anyone help me with this?</p>