title: Postgresql getting other information from max tuple
body: <p>Say you have a table with studentID, class, grade. I want the maximum grade for each class. This is easy, just group by class and get max(grade). But the problem I'm having is how to also get the studentID.</p>