title: Group By Year, Month & then Count in ActiveRecord 3
body: <p>I'm trying to pull a count of all users created in a year, and month but the following doesn't seem to work as expected.</p>
  
  <pre><code>User.group("YEAR(created_AT), MONTH(created_at)").
       count("DISTINCT(id), YEAR(created_at), MONTH(created_at)")
  </code></pre>
  
  <p>i'm looking for something like </p>
  
  <pre><code>{2011 =&gt; {1 =&gt; 222, 2 =&gt; 333, 4 =&gt; 444, 5 =&gt; 667 ... }}
  </code></pre>
  
  <p>but i'm getting</p>
  
  <pre><code>{1 =&gt; 222, 2 =&gt; 333, 4 =&gt; 444, 5 =&gt; 667 ... }
  </code></pre>
  
  <p>Am i missing something, or can ActiveRecord not give me this result in one query? </p>