Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Question regarding query

Re: Question regarding query

From: Frank van Bortel <fvanbortel_at_netscape.net>
Date: Tue, 08 Mar 2005 15:58:09 +0100
Message-ID: <d0kedb$du4$2@news5.zwoll1.ov.home.nl>


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 Bortel
Received on Tue Mar 08 2005 - 08:58:09 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US