题解 | 平均成绩大于60分的学生人数
SELECT count(*) FROM ( SELECT SC.sid as sid, avg(SC.score) as avcorse FROM SC INNER JOIN Course as CT ON SC.cid = CT.cid INNER JOIN Student as ST ON SC.sid = ST.sid GROUP BY sid having avcorse > 60 ) as re
SELECT count(*) FROM ( SELECT SC.sid as sid, avg(SC.score) as avcorse FROM SC INNER JOIN Course as CT ON SC.cid = CT.cid INNER JOIN Student as ST ON SC.sid = ST.sid GROUP BY sid having avcorse > 60 ) as re
相关推荐