标签:family code count and nbsp weight sql查询 span between
sql查询
按各科平均成绩和及格率的百分数,按及格率高到低的顺序排序,显示(课程号、平均分、及格率)
SELECT SC.COURSE_NO,ROUND(AVG(CORE),2),(SUM(CASE WHEN CORE BETWEEN 60 AND 100 THEN 1 ELSE 0 END)/COUNT(*))*100||‘%‘ 及格率 FROM HAND_STUDENT_CORE SC GROUP BY SC.COURSE_NO
标签:family code count and nbsp weight sql查询 span between
原文地址:http://www.cnblogs.com/yeshadow937/p/6112190.html