第11题写错了。应该是:
select student.SId,student.Sname,b.avg
from student RIGHT JOIN
(select sid,AVG(score) as avg from sc
where sid in (select sid from sc where score<60 GROUP BY sid HAVING count(score)>1)
GROUP BY sid) b on student.sid=b.sid;
把条件中“不及格”改成小于80分,就会看到 平均分 不一样了。