I have a bunch of records that I get from doing multiple joins.
# Name, ID, Date, Gender, Birthday #
John Doe 111 01/02/2003 M 01/01/2001
Jane Doe 222 03/04/2005 F 02/02/2002
Jane Doe 222 **03/05/2005** F 02/02/2002
Jim Doe 333 07/08/2009 M 10/11/2012
What I am trying to get is the below. The records vary only in one column (in this case, it's the date column). All other columns are exactly same.
Note that I only want one row for Jane Doe. This should be the row where date is newer (or more recent).
# Name, ID, Date, Gender, Birthday #
John Doe 111 01/02/2003 M 01/01/2001
Jane Doe 222 **03/05/2005** F 02/02/2002
Jim Doe 333 07/08/2009 M 10/11/2002
Is doing a self-join the right way to go, and if yes, can someone please explain how?
Thanks!