title: SUM with GROUP BY don't display zero sums
body: <p>I'm trying to get data from a single table. I grouped by <code>CURR</code>. I have 12 condition listed. But some are zero. </p>
  
  <pre><code>SELECT ISNULL(SUM(AMOUNT), 0) AS TOPL,
      CURR
  FROM XXX 
  WHERE DATEPART(year, CONVERT(dateTime, DATE)) = 2018 
      AND DATEPART(month, CONVERT(dateTime, DATE)) = 1
  GROUP BY CURR
  </code></pre>
  
  <p>This is returning 3 value. But I want 12 value including zero sums. I tried this with <code>CASE</code>, but I could not.</p>
  
  <p><a href="https://i.stack.imgur.com/fQV8t.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fQV8t.jpg" alt="Figure I want to show"></a></p>
  
  <p>Thanks...</p>