title: how to get the distinct records based on maximum date?
body: <p>I'm working with Sql server 2008.i have a table contains following columns,</p>
  
  <pre><code>    Id,
      Name,
      Date
  </code></pre>
  
  <p>this table contains more than one record for same id.i want to get distinct id having maximum date.how can i write sql query for this?</p>