Re: Why using "Group By"

From: Tony <>
Date: 19 Mar 2003 06:43:50 -0800
Message-ID: <> (Peter Koch Larsen) wrote in message news:<>...
> This is not legal SQL but wouldn't it be nice to have something like:
> select, person.income/(sum (person.income) group by
> person.division) from person?
> The intention is for each person to detect how large a relative salary
> he earns within each division.

Oracle has analytic queries to do that (totally non-ANSI I'm sure!):

select, person.income/(sum (person.income) over (partition by person.division)) from person; Received on Wed Mar 19 2003 - 15:43:50 CET

Original text of this message