title: Oracle select last record for a particular id
body: <p>I have a table in oracle 11g like this:  </p>
  
  <pre><code>id   date  
  ---  ---
  1    1-jun
  1    2-jun
  1    3-jun
  2    1-jul
  2    2-jul
  2    3-jul
  </code></pre>
  
  <p>I am trying to extract the latest record corresponding to each id. I tried group by, max but I cannot get it to work. What I want is:</p>
  
  <pre><code>   id    date 
     ---   ---
      1    3-jun
      2    3-jul
  </code></pre>