select *
from
(select e1.empno,
e1.ename,
e1.sal
(select avg(sal) from emp e2 where e2.deptno = e1.deptno) as avg
from emp e1) t where t.sal>t.avg
转载于:https://www.cnblogs.com/shiyunfront/p/7337631.html
select *
from
(select e1.empno,
e1.ename,
e1.sal
(select avg(sal) from emp e2 where e2.deptno = e1.deptno) as avg
from emp e1) t where t.sal>t.avg
转载于:https://www.cnblogs.com/shiyunfront/p/7337631.html