having字句的group by字句同时使用时,前后顺序有要求吗?
select c.dname,avg(a.sal)
from scott.emp a,scott.dept c
where a.deptno=c.deptno
group by c.dname
having avg(a.sal)>2000;
与
select c.dname,avg(a.sal)
from scott.emp a,scott.dept c
where a.deptno=c.deptno
having avg(a.sal)>2000
group by c.dname;
输出结果是一致的,