Hi - first of all, I'm new to SQL, so may be asking an obvious question
I need to select the max LEVEL for each SUBJECT - basically a pupil could have taken a test more than once in different subjects, and I need to get the highest level achieved for each subject (I've attached an image)
I've tried using
where level = (select max(Level) from examresults as examresults1)
But that just returns the highest level out of the whole lot, whereas I need the highest level for EACH subject by EACH pupil. If that's even possible??
Thanks in advance.
Using Microsoft SSMS 2014