title: select rand() from subquery
body: <p>I have apparently simple query:</p>
  
  <pre><code>SELECT tag_id 
  from books_tags 
  WHERE tag_id IN (SELECT tag_id 
                   FROM books_tags 
                   GROUP BY tag_id 
                   ORDER BY COUNT(tag_id) DESC 
                   LIMIT 100) 
  ORDER BY RAND() 
  LIMIT 1
  </code></pre>
  
  <p>I wish to select one random record from query inside. It does not work, error says that LIMIT and ORDER cannot appear in subquery.</p>
  
  <p>I dont wanna create temporary table, or random on servers side. Any ideas how to merge it into wone query?</p>