title: Sort on a WITH ROLLUP
body: <p>I can do the following fine:</p>
  <pre><code>SELECT provider_id, count(*) cnt 
  FROM title 
  GROUP BY provider_id WITH ROLLUP
  </code></pre>
  <p>However, it doesn't seem to support ordering after a rollup:</p>
  <pre><code>SELECT provider_id, count(*) cnt 
  FROM title 
  GROUP BY provider_id WITH ROLLUP 
  ORDER BY count(*) DESC
  </code></pre>
  <blockquote>
  <p>Incorrect usage of CUBE/ROLLUP and ORDER BY</p>
  </blockquote>
  <p>Two questions related to this:</p>
  <ol>
  <li><p>Are you not allowed to use an <code>order by</code> in the same select statement as a <code>with rollup</code>? Or, is this something specific to mysql5.7 -- in that it doesn't support this feature -- but other DBs do dupport this?</p>
  </li>
  <li><p>Given this constraint, is the only way to do the sort by using a subselect?</p>
  <pre><code>SELECT * FROM  (&lt;rollup query&gt;) _ ORDER BY cnt DESC
  </code></pre>
  </li>
  </ol>
  <hr />
  <p>Related, but doesn't really answer the above question (as I already have the query above): <a href="https://stackoverflow.com/a/1768565/651174">https://stackoverflow.com/a/1768565/651174</a>.</p>