【mysql经典题】4、查询平均成绩小于等于60分的学生的学生编
2020-10-15 本文已影响0人
而立之年的技术控
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;
注:这题和第三题一样哈