1、select avg(sal) , max(sal) ,deptno from emp group by deptno;
2、 select avg(sal) , max(sal) ,deptno,job from emp group by deptno,job;
3、 select avg(sal) ,deptno from emp group by deptno having avg(sal)<2000;