34,873
社区成员
发帖
与我相关
我的任务
分享select 考试试卷
,参考人=count(*)
,通过人数=(select count(*) from TB where 考试试卷=T.考试试卷 And 成绩>60)
,通过率=Ltrim(
cast((select count(*) from TB where 考试试卷=T.考试试卷 And 成绩>60)*100.00/count(*) as decimal(6,2)))+'%'
,平均分=avg(成绩)
from TB T
Group by T.考试试卷select 考试试卷
,参考人=count(*)
,通过人数=(select count(*) from TB where 考试试卷=T.考试试卷 And 成绩>60)
,通过率=Ltrim((select count(*) from TB where 考试试卷=T.考试试卷 And 成绩>60)*100.00/count(*))+'%'
,平均分=avg(成绩)
from TB T
Group by T.考试试卷select 考试试卷, sum(参考人) ,sum(通过人数),
通过率=ltrim(cast(sum(通过人数)*100.00/sum(参考人) as decimal(6,2)))+'%',
平均分=AVG(分数)
from tb
group by 考试试卷