为什么不能再where语句中使用聚合函数
1.问题描述
select deptno ,avg(sal) from emp where count(*)>3 group by deptno; 在where 句中使用聚合函数count(*),报出错误:ORA-00934: group function is not allowed here
那是为什么呢?
2.问题解决:
大致解释如下,sql语句的执行过程是:from-->where
原创
2016-08-15 15:07:42 ·
25019 阅读 ·
5 评论