数据1.3
select e.ename,e.job,e.sal,m.ename,m.job,d.dname,s.grade, temp.count, temp.avg
from emp e,emp m,dept d, salgrade s,(select deptno de, count(empno) count,avg(sal) avg from emp group by deptno ) temp
where e.deptno=d.deptno
and e.mgr=m.empno
and e.sal between s.losal and s.hisal
And e.sal>(Select avg(sal) from emp)
and e.deptno=temp.de;