文章列表
select e.ename,e.salary,e.deptno
from employee e join
(select deptno,round(avg(salary)) avgsal
from employee
group by deptno) a
on e.deptno = a.deptno
and e.salary > a.avgsal
其中select子句的查询结果集是:
1 30 4500
2 20 11667
3 10 8000
那么e.salary > a.avgsal是怎么执行的呢?
我今天问了 ...