Here\'s a simplified example of what I\'m talking about:
Table: students exam_results _____________ ____________________________________ | id | name |
Try this,
Select student.name, max(result.score) As Score from Student INNER JOIN result ON student.ID = result.student_id GROUP BY student.name