Hi! I'm making a clean up script that should find all entries where userID and link are the same and delete the post with the oldest date.

ID userID Link Date
1 2 b.com 2004
2 2 b.com 2005
3 2 c.com 2004

The script should remove post ID 1 becasue it is a duplicate of post ID 2 but older date.

How do I do this!!