select courseId,avg(result) from score group by courseId;
# 获取结果的子查询
select courseId,avg(result) from score group by courseId
order by avg(result) desc limit 1;
# 父类查询
select courseName '科目名称',department '系别',number '人数'
from course where id=(
select courseId from score group by courseId
order by avg(result) desc limit 1
);
09-03
1万+
05-24
464
08-06
4854
01-25
1869