sql中统计不及格人数超过50人的语句

2025-03-22 00:54:23
推荐回答(1个)
回答(1):

查询不及格人数超过1人的班级

SELECT a.classId 不及格人数超过1人的班级, a.num 不及格人数 FROM (select  classId, count(*) num from score where score <= 60 GROUP BY classId) a  where a.num>1;


是要这样的效果吗?