title: mysql query that has join and counts
body: <p>I need help getting the top 5 results and their counts from columns from two different tables in a mysql database joined together.</p>
  
  <pre><code>table1 cols
  -------
  id, country, timestamp
  
  table2 cols
  --------
  id, table1_id, reason
  </code></pre>
  
  <p>The results id like to get are the top 5 countries and their number of times found between two timestamps, and the top 5 reasons and their counts for all the rows used to generate the first count. There is a one to many relationship between table1 and table2. This is stumping me and I appreciate any insight you could give me.  </p>