title: Finding Groupwise Maximum In Doctrine
body: <p>How do you find a groupwise maximum, or the row containing the maximum value, in Doctrine? In SQL, I would typically do this using a self join as described <a href="http://dev.mysql.com/doc/refman/5.0/en/example-maximum-column-group-row.html" rel="nofollow noreferrer" title="here">here</a>.</p>
  
  <p>While it's possible to set up a self relation in Doctrine, are there any better ways to do this?</p>