title: SQL - Select unique rows from a group of results
body: <p>I have wrecked my brain on this problem for quite some time. I've also reviewed other questions but was unsuccessful. </p>
  
  <p>The problem I have is, I have a list of results/table that has multiple rows with columns<br/><br/>
  | REGISTRATION | ID &nbsp;&nbsp;&nbsp;&nbsp;| DATE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| UNITTYPE</p>
  
  <p>| 005DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 172 &nbsp;&nbsp;| 2007-09-11 &nbsp;| MBio<br>
  | 005DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 1966 | 2006-09-12 &nbsp;| Tracker<br>
  | 013DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 2281 | 2006-11-01 &nbsp;| Tracker<br>
  | 013DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 2712 | 2008-05-30 &nbsp;| MBio<br>
  | 017DTNGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 2404 | 2006-10-20 &nbsp;| Tracker<br>
  | 017DTNGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 508 &nbsp;&nbsp;| 2007-11-10 &nbsp;| MBio<br></p>
  
  <p><br/>
  I am trying to select rows with unique REGISTRATIONS and where the DATE is max (the latest). The IDs are not proportional to the DATE, meaning the ID could be a low value yet the DATE is higher than the other matching row and vise-versa. Therefore I can't use MAX() on both the DATE and ID and grouping just doesn't seem to work.</p>
  
  <p>The results I want are as follows;
  <br><br></p>
  
  <p>| REGISTRATION | ID &nbsp;&nbsp;&nbsp;&nbsp;| DATE &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| UNITTYPE</p>
  
  <p>| 005DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 172 &nbsp;&nbsp;| 2007-09-11 &nbsp;| MBio<br>
  | 013DTHGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 2712 | 2008-05-30 &nbsp;| MBio<br>
  | 017DTNGP &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;| 508 &nbsp;&nbsp;| 2007-11-10 &nbsp;| MBio<br><br></p>
  
  <p>PLEASE HELP!!!?!?!?!?!?!?</p>