title: SQL Get Other Rows From Aggregate Function
body: <p>I have an aggregate function that does a group by (col A).  It selects the maximum value from a set of columns(col B), but I also want to return another value from a column in the same row(col C).  But if it groups 3 rows it selects the first value from column C not the column with the maximum (MAX(col B)).</p>
  
  <pre><code>A    B    C
  1     75  jkl
  1    100  abc
  1    125  dae
  2    200  def
  3    300  ghi
  
  "SELECT A, MAX(B), C FROM myTable where B &gt; 50 GROUP BY A"
  
  returns (first row) A =&gt; 1, B =&gt; 125, C =&gt; jkl
  
  I want it to return 
  
  A =&gt; 1, B =&gt; 125, C =&gt; dae
  </code></pre>