I have a table student with the fields id, name and mark.
I need to get the student name(s) having second largest mark.
I tried:
SELECT DISTINCT name FROM stud ORDER BY mark DESC LIMIT 2,1
but that returns only one student name having second second largest mark.
I need to list all student names if many of them having second largest mark.
How can I do this?
1 Answer