Dird (7/28/2013)
Do what Jeff said but replace
PARTITION BY StudentName
With
PARTITION BY SubjectName
I read it as wanting to know the best subject for each student hence the partitioning by StudentName. Partitioning by SubjectName would be to find the best student in each subject. Heh... of course, if we had some sample data and expected results for given sample data, we'd know for sure.
--Jeff Moden
Change is inevitable... Change for the better is not.