56,677
社区成员
发帖
与我相关
我的任务
分享
1、select b.teacher_id,count(0) from 学生-班级表 a,老师-班级表 b where a.class_id = b.class_id group by b.teacher_id;
2、select class_id,count(0) from 学生-班级表 group by class_id;
3、select * from score where score < 60;
4、select b.class_id,sum(case when a.score >= 100 and a.score < 90 then 1 else 0 end)score100_90,
sum(case when a.score >= 90 and a.score < 80 then 1 else 0 end)score90_80,
sum(case when a.score >= 80 and a.score < 60 then 1 else 0 end)score80_60
from score a,学生-班级表 b where a.student_id = b.student_id group by b.class_id