title: Postgresql getting all months of year and null values
body: <p>I'm trying to make a query in PostgreSQL which should give me all the months that are in a year, sorted per month. And also the <code>null</code> values of the months in which the sales column is empty. However I can't show the all the months and no <code>null</code> values at all. Please help?</p>
  
  <p>Here is my query:</p>
  
  <pre><code>SELECT
      to_char(date_trunc('Month', dateofmonth), 'Month') MON,
      sum(sales) SALES
  FROM SALES_TABLE
  GROUP BY MON;
  </code></pre>