title: Group by Sum and Count of Table Records Rails
body: <p>So i have a table with a listings which has various dates and amount. </p>
  
  <pre><code>e.g. 
  Date               Amount 
  2/1/2015           200
  3/2/2015           300
  7/2/2015           350
  8/1/2015           400 
  </code></pre>
  
  <p>I want to be able to write a query which returns the sum of the amount grouped by month. </p>
  
  <pre><code>So e.g. Jan 600, Feb 650 
  </code></pre>
  
  <p>How do i do that in rails? Sql </p>