title: Showing the most populous products in a table?
body: <p>How would I show, for example, the 10 most populous products in a table?</p>
  
  <p>I have a sales table for example, that contains sales for 20 beers, 10 nachos, 5 peanuts, 2 hotdogs and 4 breakfasts.</p>
  
  <p>Is there a way to automatically calculate and see which is the most popular, and show them in descending order?</p>
  
  <p>edit:</p>
  
  <p>My table is as follows</p>
  
  <p>Tablename: sales</p>
  
  <p>Fields:</p>
  
  <ul>
  <li>product (varchar)</li>
  <li>quantity (int)</li>
  <li>cost (decimal)</li>
  <li>saledate (date)</li>
  </ul>
  
  <p>One sale record could count as more than one sale of a product, because of the quantity field.</p>
  
  <p>I also have a guests table, which only has the fields name and country, and was wanting to show say, the top 5 most populous countries in the table.</p>