错误代码:1111。无效使用组函数 MYSQL ERROR
Error Code: 1111. Invalid use of group function MYSQL ERROR
我正在尝试查找低于课程平均成绩的学生列表
我有这个问题
Select studentName
from courseGrade
where grade < avg(grade) and sectionID=290001
使用子查询计算课程的平均成绩。例如:
select studentName
from courseGrade
where sectionID = 290001
and grade < (
select avg(grade) from courseGrade where sectionID = 290001
)
我正在尝试查找低于课程平均成绩的学生列表
我有这个问题
Select studentName
from courseGrade
where grade < avg(grade) and sectionID=290001
使用子查询计算课程的平均成绩。例如:
select studentName
from courseGrade
where sectionID = 290001
and grade < (
select avg(grade) from courseGrade where sectionID = 290001
)