where子句中是不能用聚集函数作为条件表达式。
select sno from sc where avg(grade) > 90 group by sno;
改为
select sno from sc group by sno having avg(grade) >90;
2024-01-21 19:43:58
where子句中是不能用聚集函数作为条件表达式。
select sno from sc where avg(grade) > 90 group by sno;
改为
select sno from sc group by sno having avg(grade) >90;