查询所有同学的学号、姓名、选课数、总成绩

select
Student.S_ID,
Student.Sname,
count(SC.C_ID),
sum(score) from Student left Outer join SC on Student.S_ID=SC.S_ID group by Student.S_ID,Sname

原文地址:https://www.cnblogs.com/Sorry-/p/14030229.html