title: SQL get the latest records from a set of data
body: <p>So I have a table of holdings where each holding has a date column. e.g.</p>
  
  <pre><code>id   |   holding_name   |   value   |   holding_date
  ----------------------------------------------------
  1    |   iShares MSCI   |   2032    |   2013-12-31
  2    |   Vanguard Bonds |   5332    |   2013-12-31
  3    |   iShares MSCI   |   2241    |   2014-01-31
  4    |   Vanguard Bonds |   6236    |   2014-01-31
  </code></pre>
  
  <p>If I wanted to select only the latest holdings I could go</p>
  
  <pre><code>SELECT * FROM holdings WHERE holdings.holding_date = '2014-01-31'
  </code></pre>
  
  <p>But what if I don't know that the latest date is 2014-01-31? Is there a way to build this into the query?</p>