title: Select first row numeric values in SQL (Redshift) group by
body: <p>I have a table of the following structure:</p>
  
  <pre><code>ID    latitude   longtitude   other..columns
  A12    54.55        -43.26       .
  A21    57.00        -43.25       .
  V51    54.55        -44.25       .
  V51    54.50        -43.25       .
  A12    55.11        -43.15       .
  B43    50.16        -43.25       .
  </code></pre>
  
  <p>I am grouping the table by <code>ID</code> and aggregating other columns by avg and min/max.
  When it comes to the lat/long however, I want to pick a latitude by any aggregating (min or max, does not matter), and pick its equivalent longitude (e.g. for <code>A12</code> -> <code>54.55</code>&amp;<code>-43.26</code>), rather than aggregate as average or min/max separately.</p>
  
  <p>Is there a smart and simple way to build this query?</p>
  
  <p>Current query looks something like:</p>
  
  <pre><code>select 
  avg(other_columns),
  min(latitude),
  ?(longtitude)
  from table
  group by ID;
  </code></pre>
  
  <p>EDIT: Clarified requirements following comments.</p>