select s.sno, s.sname, tmp.avg_sc
from student s
join (select sno, ROUND(avg(score), 2) avg_sc from sc group by sno having avg_sc < 60) tmp on s.sno = tmp.sno;
注:这题和第三题一样哈
select s.sno, s.sname, tmp.avg_sc
from student s
join (select sno, ROUND(avg(score), 2) avg_sc from sc group by sno having avg_sc < 60) tmp on s.sno = tmp.sno;
注:这题和第三题一样哈
本文标题:【mysql经典题】4、查询平均成绩小于等于60分的学生的学生编
本文链接:https://www.haomeiwen.com/subject/qnjnpktx.html
网友评论