title: how to group by month in postgresql and rails 3
body: <p>I have value like 2014/03/01, 2014/02/20, 2014/02/19, 2014/02/18, 2014/01/19 ...</p>
  
  <p>And I wanna get sum(price) by month. For first month, second, third month, ...</p>
  
  <p>Using rails 3 &amp; postgresql.</p>
  
  <p>I have tried  <code>@items = Item.where(:asin =&gt; @item.asin, :domain =&gt; @item.domain, :user_id =&gt; @item.user_id).order('created_at desc').group {created_at.beginning_of_month }</code>
  didn't work.</p>
  
  <p>I tried other stuff too, but it seems to be ignored, no group or group by in the log <code>SELECT "items".* FROM "items" WHERE "items"."asin" = 'B00HI6ZLL2' AND "items"."domain" = 'co.jp' AND "items"."user_id" = 1 ORDER BY created_at desc</code></p>