日期:2014-05-17 浏览次数:20527 次
select '语文3',
round(sum(CASE WHEN 语文>=70.5 THEN 语文 ELSE 0 END)/count(1)*100,2) as 优秀率,
round(sum(CASE WHEN 语文>=58 THEN 语文 ELSE 0 END)/count(1)*100,2) as 良好率,
round(sum(CASE WHEN 语文>=48 THEN 语文 ELSE 0 END)/count(1)*100,2) as 及格率,
round(avg(语文),2) as 平均分
from cj
where 班级='26'
select '语文3',
round(sum(CASE WHEN 语文>=70.5 THEN 1 ELSE 0 END)/count(1)*100,2) as 优秀率, round(sum(CASE WHEN 语文>=58 THEN 1 ELSE 0 END)/count(1)*100,2) as 良好率, round(sum(CASE WHEN 语文>=48 THEN 1 ELSE 0 END)/count(1)*100,2) as 及格率,
round(avg(语文),2) as 平均分
from cj where 班级='26'