You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SELECT exam_id, exam.student_id, student_name, score, RANK() OVER(PARTITION BY exam_id ORDER BY score) rk1, RANK() OVER(PARTITION BY exam_id ORDER BY score DESC) rk2
4
+
FROM exam LEFT JOIN student
5
+
ONexam.student_id=student.student_id
6
+
)
7
+
8
+
SELECT DISTINCT student_id, student_name
9
+
FROM cte
10
+
WHERE student_id NOT IN (SELECT student_id FROM cte WHERE rk1 =1or rk2 =1)
0 commit comments