Re: Oracle Analytical functions - Qn

From: Jusung Yang <JusungYang_at_yahoo.com>
Date: 10 Nov 2002 09:48:46 -0800
Message-ID: <130ba93a.0211100948.46add397_at_posting.google.com>


The posting looks incomplete. ID2 does not seem to play a role in your query. If so, a sum and a ratio_to_report should do it. Something like

select ID, ratio_to_report(c1) over() from (

   select ID, sum(bytes) c1 from <table_name> group by ID)

select
rejib_at_yahoo.com (Reji) wrote in message news:<ce0b2a83.0211091330.4b444432_at_posting.google.com>...
> I have the following data set:
>
> ID ID2 BYTES
> 1000 1000 1000
> 1000 1200 2000
> 1000 1300 2000
> 1200 1400 5000
> 1200 1000 5000
> 1250 1400 5000
>
> Assume that ID and ID2 are two locations and BYTES - number of bytes
> transfered from ID to ID2
>
> I would like to produce couple of results
>
> 1) Shared percentage of data transfered from each ID
>
> Ex with this data set
>
> ID Shared percentage
> 1000 25% (5000/20000)*100
> 1200 50%
> 1250 25%
>
> I would like to use oracle analytical function if I can...please help
> me here
>
> RB
Received on Sun Nov 10 2002 - 18:48:46 CET

Original text of this message