title: mysql order by with limit
body: <p>I have a query where I want to get the 20 most popular locations from a table, and then order them alphabetically.  I'm wondering if there's a cleaner or more efficient way to do this?</p>
  
  <pre><code>SELECT
    city
  FROM (
    SELECT 
      city, 
      count(*) AS cnt
    FROM locations 
    GROUP BY city
    ORDER BY cnt DESC
    LIMIT 20
  ) s ORDER BY city;
  </code></pre>