title: Oracle sql retrive records based on maximum time
body: <p>i have below data.</p>
  
  <pre><code>table A
  
  id   
  
  1
  
  2
  
  3
  
  table B
  
  id       name      data1        data2     datetime
  
  1        cash      12345.00                12/12/2012 11:10:12
  
  1        quantity   222.12                  14/12/2012 11:10:12
  
  1        date     20/12/2012               12/12/2012 11:10:12
  
  1        date     19/12/2012                13/12/2012 11:10:12
  
  1        date     13/12/2012                14/12/2012 11:10:12
  
  1        quantity   330.10                   17/12/2012 11:10:12
  </code></pre>
  
  <p>I want to retrieve data in one row like below:</p>
  
  <pre><code>tableA.id      tableB.cash        tableB.date     tableB.quantity 
  
  1               12345.00          13/12/2012       330.10
  </code></pre>
  
  <p>I want to retrieve based on max(datetime).</p>