where子句中是不能用聚集函数作为条件表达式。
select sno from sc where avg(grade) > 90 group by sno;
改为
select sno from sc group by sno having avg(grade) >90;
sql查询
原文:https://www.cnblogs.com/juanzhi/p/12652649.html