--15. 找出平均成绩在85分以上的学生,结果按系分组,并按平均成绩的升序排列;
select sdept,sc.sno,avg(grade)
from sc,student
where sc.sno=student.sno
group by sc.sno,sdept
having avg(grade)>85
order by avg(grade)
go
--15. 找出平均成绩在85分以上的学生,结果按系分组,并按平均成绩的升序排列;
select sdept,sc.sno,avg(grade)
from sc,student
where sc.sno=student.sno
group by sc.sno,sdept
having avg(grade)>85
order by avg(grade)
go