可以这样写:我已经测试过了:
select student.姓名,avg(sc.成绩)
from student,sc
where student.学号=sc.学号 and 姓名
in
(
select student.姓名 from student,sc
where student.学号=sc.学号 and sc.成绩<60
group by student.姓名
having count(*)>=2
)
group by student.姓名
另外group by的详细资料最好使用sql自带的帮助文档,那里最全的,其他的资料都是从哪盗版过去的,遇到group by问题可以问我的。