title: SQL Server : select from duplicate columns where date newest
body: <p>I have inherited a SQL Server table in the (abbreviated) form of (includes sample data set):</p>
  
  <pre><code>| SID | name  | Invite_Date |    
  |-----|-------|-------------|    
  | 101 | foo   | 2013-01-06  |   
  | 102 | bar   | 2013-04-04  |    
  | 101 | fubar | 2013-03-06  | 
  </code></pre>
  
  <p>I need to select all <code>SID</code>'s and the <code>Invite_date</code>, but if there is a duplicate <code>SID</code>, then just get the latest entry (by date).  </p>
  
  <p>So the results from the above would look like:</p>
  
  <pre><code>101 | fubar | 2013-03-06  
  102 | bar   | 2013-04-04
  </code></pre>
  
  <p>Any ideas please.  </p>
  
  <p>N.B the <code>Invite_date</code> column has been declared as a <code>nvarchar</code>, so to get it in a date format I am using <code>CONVERT(DATE, Invite_date)</code></p>