title: Counting most occurrences of a field's value
body: <p>Given the following query, how do I return the p_name with the most transactions? And similarly, how do I return the t_amount with the most transactions. I'd like to do it all in this one query of course.</p>
  
  <pre><code>SELECT t.*, p.* 
  FROM transactions t
  LEFT JOIN partners p ON p.id=t.partner_id
  </code></pre>
  
  <p>which can return something like:</p>
  
  <pre><code>t_amount     t_platform      t_user     p_id      p_name
  
  100.00       windows         122         20       simmons
  200.00       windows         211         20       simmons
  100.00       mac             200         18       smith
  100.00       linux           190         20       simmons
  100.00       mac             100         18       smith
  </code></pre>
  
  <p>So given that result set, I'd get back best_partner = simmons  and also best_amount = 100.00</p>
  
  <p>Thanks!</p>