title: Taking the record with the max date
body: <p>Let's assume I extract some set of data.</p>
  
  <p>i.e.</p>
  
  <pre><code>SELECT A, date
  FROM table
  </code></pre>
  
  <p>I want just the record with the max date (for each value of A). I could write </p>
  
  <pre><code>SELECT A, col_date
    FROM TABLENAME t_ext
   WHERE col_date = (SELECT MAX (col_date)
                       FROM TABLENAME t_in
                      WHERE t_in.A = t_ext.A)
  </code></pre>
  
  <p><strong>But my query is really long... is there a more compact way using ANALYTIC FUNCTION to do the same?</strong></p>