SELECT 学号 = S.SNo,
姓名 = SName,
平均分 = AVG(Score)
FROM Student S
LEFT OUTER JOIN SC
ON S.SNo=SC.SNo
GROUP BY S.SNo,SName
select sno,sname,avg(score) from sc,student
where sc.sno=student.sno order by sno;
select sno,sname,avg(score) from sc,student where sc.sno=student.sno order by sname;