title: MySQL - Selecting people's names based on most occurrences
body: <p>Given:</p>
  
  <p>Table called <code>names</code> with <code>id</code>, <code>first</code> and <code>last</code> fields.</p>
  
  <p>How would you find the top 5 most popular people by occurrence when the <code>first</code> and <code>last</code> are separate fields? This is the non-working code I have now...</p>
  
  <pre><code>`SELECT *, COUNT(first) AS occurrences FROM `names` GROUP BY first ORDER BY occurrences DESC LIMIT 5`
  </code></pre>
  
  <p>Any help would be appreciated!</p>