select max(avg(sal)) from emp group by deptno;
这句是正确的
select deptno,max(avg(sal)) from emp group by deptno;
这句是错的。
select max(avg_sal) from
(select deptno,avg(sal) avg_sal from emp group by deptno);