title: How to fetch data in below format?
body: <p>I have a table like </p>
  
  <pre><code> ___________
  | id | date |
   -----------
  </code></pre>
  
  <p>with values like</p>
  
  <pre><code>1, 2012-02-21 04:04:04
  2, 2012-02-21 05:03:05
  3, 2012-02-22 03:03:03
  </code></pre>
  
  <p>Now, ask is to have a query which fetches 1 id/day which is corresponding to lower date
  so, in this case query should return </p>
  
  <pre><code>id
  ---
  1
  3
  </code></pre>
  
  <p>// for date=2012-02-21, there are 2 rows, so row with id 1 is selected due to lower date value
  // for date=2012-02-22, there is only 1 row, so corresponding id is picked</p>
  
  <p>(Sorry for not a descriptive title)</p>