如图:(表名叫 ExamStudentScoreInfo)
sql语句:
select * from ExamStudentScoreInfo ess
where not exists(select 1 from ExamStudentScoreInfo where username = ess.username and other2 < ess.other2 and ExamId=ess.ExamId)
SQL查询:高效筛选学生分数
本文介绍了一种使用SQL语句实现的学生分数筛选方法,通过排除特定条件下的记录来获取分数较高的学生信息。
如图:(表名叫 ExamStudentScoreInfo)
sql语句:
select * from ExamStudentScoreInfo ess
where not exists(select 1 from ExamStudentScoreInfo where username = ess.username and other2 < ess.other2 and ExamId=ess.ExamId)

被折叠的 条评论
为什么被折叠?