统计每个班的“语文”的及格人数
2014-10-25 22:07:42 访问(2209) 赞(0) 踩(0)
-
select
r.TheNumber as '及格人数',c.TheName as '班级'
from
UTB_EXAM_CLASS c,
(
select
count(s.ID) as TheNumber,
s.ClassId
from
UTB_EXAM_SCORE sc,
UTB_EXAM_STUDENT s,
UTB_EXAM_COURSE c
where
sc.Score >= 60
and sc.StudentId = s.ID
and c.TheName = '语文'
and sc.CourseId = c.ID
group by
s.ClassId
)
r
where
c.ID = r.ClassId
order by c.ID asc
标签:
统计每个班的“语文”的及格人数 


上一条:
下一条:
相关评论
发表评论