SyntaxFix
Write A Post
Hire A Developer
Questions
You can use a join to do this
SELECT t1.* from myTable t1 LEFT OUTER JOIN myTable t2 on t2.ID=t1.ID AND t2.`Date` > t1.`Date` WHERE t2.`Date` IS NULL;
Only rows which have the latest date for each ID with have a NULL join to t2.