This is my table: The table
Now I grouped classes and wanted to select the first_name from each group(class) with the highest marks.
But in class 7 group, I am getting 'edward' instead of 'tony' even though tony has higher marks. how should I order inside a group. I want to order by marks descending.
my output: MY output