日期:2014-05-17 浏览次数:20480 次
select course.cno,avg(grade) avggrade,count(course.cno) '选修该课程人数' from course left join sc on course.cno=sc.cno group by course.cno
------解决方案--------------------
select
course.cno,avg(grade) avggrade,
isnull(count(course.cno),0) as '选修该课程人数'
from
course left join sc on course.cno=sc.cno
group by
course.cno