190k views
1 vote
Suppose a student table has two columns, names and marks. How to get name and marks of top three students

1 Answer

1 vote

Answer:

SELECT Name, Marks FROM Student s1 where 3 <= (SELECT COUNT(*) FROM Students s2 WHERE s1.marks = s2.marks)

User Liz Barrett
by
5.2k points