统计每个班每个科目的及格人数

2014-10-25 22:15:53  访问(2416) 赞(0) 踩(0)

  • 
    select 
    c.TheName as '班级',
    co.TheName as '科目',
    r.TheNumber as '及格人数'
    from
    UTB_EXAM_CLASS c,
    UTB_EXAM_COURSE co,
    (
    select 
    sc.CourseId,s.ClassId,count(1) as TheNumber 
    from 
    UTB_EXAM_SCORE sc,
    UTB_EXAM_STUDENT s 
    where 
    sc.Score >= 60
    and sc.StudentId = s.ID
    group by sc.CourseId,s.ClassId
    )
    r
    where
    c.ID = r.ClassId
    and co.ID = r.CourseId
    order by c.ID asc ,co.ID
     
    

标签:统计每个班每个科目的及格人数 

上一条:

下一条:


 

相关评论

评论加载中……
 

发表评论

类型:
内容:
  (Alt+Enter)
 
  ┈全部┈  
 
(显示默认分类)