title: Most efficient way to retrieve "top x" records using Rails
body: <p>We've gotten a report request in, and I'm trying to find out the easiest and most efficient way to pull the numbers.</p>
  
  <p>I have a <em>Deal</em>  model with two attributes: _quantity_purchased_ and <em>price</em>.  I've been asked to retrieve a list of the top 100 best selling deals in the database.  To see how well a deal has done, we multiply the quantity_purchased by the price.</p>
  
  <p>Now, I'm sure I could write something convoluted to get my results, but this seems like such a simple operation, that there has got to be an easier way of doing it.  Is there something I could do in MySQL, or using Ruby/Rails?  Or am I stuck finding some kind of unpleasant loop?</p>
  
  <p>FYI, we are running Rails 2.3.</p>