clear markdown compare help donate comments/suggestions/bugs a leap of faith? diddy dollings
clear markdown donate comments/suggestions/bugs a leap of faith?
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0. 432181 distinct fiddles created so far.

WITH yourTable AS ( SELECT 1 AS id, 'James' AS student_name, '001350' AS phone_num, 89 AS score UNION ALL SELECT 2, 'Roomi', '123012', 78 UNION ALL SELECT 3, 'Sibay', '123012', 65 UNION ALL SELECT 4, 'Ellae', '123012', 78 UNION ALL SELECT 5, 'Katee', '123012', 33 ) SELECT id, student_name, score FROM yourTable WHERE score IN (SELECT DISTINCT TOP 3 score FROM yourTable ORDER BY score DESC) ORDER BY score DESC;
id student_name score
1 James 89
4 Ellae 78
2 Roomi 78
3 Sibay 65
 hidden batch(es)