今天爱分享给大家带来列出各个部门中工资高于本部门的平均工资的员工数和部门号,并按部门号排序.【面试题详解】,希望能够帮助到大家。
select a.ename,a.salary,a.deptid from emp a, (select deptd,avg(salary) avgsal from emp group by deptid ) b where a.deptid=b.deptid and a.salary>b.avgsal ;
原文链接:http://blog.itblood.com/3156.html,转载请注明出处。

![熟女天堂1.0独家版 [神作RPG/独家/史诗级乱伦]](/wp-content/uploads/replace/2025/07/18/5db2147f071bc8556be2dde93a6214b7.webp)