title: Tsql Get newest records from table
body: <p>i have this table:</p>
  
  <pre><code>Location                      date                temp
  
  1                             12-12-2009         19
  1                             14-12-2009         21
  1                             13-12-2009         17
  2                             12-12-2009         18
  2                             14-12-2009         16
  2                             18-12-2009         12
  2                             15-12-2009         14
  </code></pre>
  
  <p>now i want to select the latest (newest date) rows for all locations, so tin his example row 2 and row 7.
  How can i do this?</p>
  
  <p>i can select the latest for 1 location with top 1 date for a single location, i tried grouping by location, date but then i miss the temp....</p>
  
  <p>Kind regards,
  Michel</p>