//查询各部门平均工资,显示平均工资大于
//公司整体平均工资的记录
select deptno,avg(sal)
from emp
group by deptno
having avg(sal)>(select avg(sal) from emp);
时间: 2024-11-06 23:12:25
//查询各部门平均工资,显示平均工资大于
//公司整体平均工资的记录
select deptno,avg(sal)
from emp
group by deptno
having avg(sal)>(select avg(sal) from emp);