(
SELECT
EMP.ENAME,
EMP.EMPNO,
EMP.DEPTNO,
avg_t.AVG_SAL AS SAL
FROM
EMP,
(
SELECT
DEPTNO,
AVG( SAL ) AS AVG_SAL
FROM
EMP
GROUP BY
DEPTNO
) avg_t
WHERE
EMP.DEPTNO = avg_t.DEPTNO
AND EMP.SAL > avg_t.AVG_SAL
年轻人,作业要自己做
都没有认真琢磨,挨个就贴出来了