关于数据库Oracle的一道题a.course=b.能通俗点解析吗?select courseid as 课程ID,course as 课程名称,nvl(avg(grade),0) as 平均成绩,(select count(grade) from train a where grade

问题描述:

关于数据库Oracle的一道题a.course=b.能通俗点解析吗?
select courseid as 课程ID,course as 课程名称,nvl(avg(grade),0) as 平均成绩,
(select count(grade) from train a where grade

是【自连接】,b作为主表,a作为b的镜像
a.course=b.course是为了确保a中的数据与b一致
grade