title: How to use several aggregate functions at once in Rails/ActiveRecord?
body: <p>I want to do several aggregate functions at once, eg to get the max and min id's grouped by status:</p>
  
  <pre><code>Model.maximum(:id).minimum(:id).group(:status)
  </code></pre>
  
  <p>This doesnt work (at least with Rails 3.1.1) - you get an error on the minimum call, saying its not defined on Fixnum.</p>
  
  <pre><code>NoMethodError: undefined method `minimum' for 22377:Fixnum
  </code></pre>
  
  <p>I could do raw sql for it - but just wondering if there is a higher level/Rails option...</p>
  
  <p>Thanks, Chris</p>