title: Group query results by month and year in postgresql
body: <p>I have the following database table on a Postgres server: </p>
  
  <pre><code>id      date          Product Sales
  1245    01/04/2013    Toys    1000     
  1245    01/04/2013    Toys    2000
  1231    01/02/2013    Bicycle 50000
  456461  01/01/2014    Bananas 4546
  </code></pre>
  
  <p>I would like to create a query that gives the <code>SUM</code> of the <code>Sales</code> column and groups the results by month and year as follows:</p>
  
  <pre><code>Apr    2013    3000     Toys
  Feb    2013    50000    Bicycle
  Jan    2014    4546     Bananas
  </code></pre>
  
  <p>Is there a simple way to do that?</p>