title: HQL/SQL select top 10 records based on count
body: <p>I have 2 tables: </p>
  
  <pre><code>CATEGORY (id)
  POSTING (id, categoryId)
  </code></pre>
  
  <p>I am trying to write an HQL or SQL query to find top 10 Categories which have the most number of Postings.  </p>
  
  <p>Help is appreciated.</p>