| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> c.d.o.misc -> Question regarding query
Hey All,
I was browsing and reading on some of the analytical functions within Oracle. I came across this example:
SELECT deptno, ename, sal,
ROUND(average_sal_dept,0) AS average_sal_dept,
ROUND(sal - average_sal_dept,0) AS sal_variance
FROM (SELECT deptno, ename, sal,
AVG(sal) OVER
(PARTITION BY deptno) AS average_sal_dept
FROM emp);
I'm trying to reconstruct that same query without the analytical functions, just because I'm curious on what the query would look like. So far, it seems a bit hairy.....
Any takers? Received on Mon Mar 07 2005 - 15:51:05 CST
![]() |
![]() |