学生表: 成绩表: 问题:统计各系各门课程的平均成绩 答案:
select sdept,cno,AVG(grade)avg_grade from S join SC on S.sno = SC.sno group by sdept,cno order by sdept
结果: