oracle 工资大于所在部门平均工资的人 分别怎么写

2025-03-23 04:29:20
推荐回答(1个)
回答1:

select A.* from emp a,
(select deptid,avg(salary) salary
from emp
group by deptid
) b
where a.deptid = b.deptid and a.salary > b.salary