Here\'s a simplified example of what I\'m talking about:
Table: students exam_results _____________ ____________________________________ | id | name |
Select Name, T.Score, er. date from Students S inner join (Select Student_ID,Max(Score) as Score from Exam_Results Group by Student_ID) T On S.id=T.Student_ID inner join Exam_Result er On er.Student_ID = T.Student_ID And er.Score=T.Score