现有一个需求,表关系图如下所示:
问题一:
求每个学生的平均成绩、总成绩,且筛选出平均成绩大于80
select student.name,avg(score.score),sum(score.score)
from student inner join scoer on student.id = score.sid
group by student.name
having avg(score.score) >= 80
limit 0,3
求每个学生的平均成绩、总成绩,且筛选出平均成绩大于80
select student.name,avg(score.score),sum(score.score)
from student inner join scoer on student.id = score.sid
group by student.name
having avg(score.score) >= 80
limit 0,3