oracle简单查询语句
oracle
操作方法
- 01
求部门中哪些人的薪水最高; select ename,sal form emp join (select max(sal) max_sal,deptno from emp group by deptno)t on (emp.sal=t.max_sal and emp.deptno=t.deptno); 求部门平均薪水的等级 select deptno,avg_sal,grade from (select deptno,avg(sal) avg_sal from emp group by deptno)t join salgrade s on(t.avg_sal between s.losal and s.hisal);
赞 (0)