Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Question regarding query
amerar_at_iwc.net wrote:
> Hi All,
>
> I was reading on some of the Oracle analytical functions. I was
> playing with this query:
>
> 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'd like to see that that would look like if it had to be done in
> native SQL, without the help of analytical functions, but I'm having
> some problems. Anyone care to take a shot at creating that SQL?
>
> Arthur
>
You already posted that. Any reasons to post it again?
Due date arriving? For homework - because it smells like
homework.
Show us what you got, and maybe someone will consider replying
-- Regards, Frank van BortelReceived on Tue Mar 08 2005 - 08:58:09 CST
![]() |
![]() |