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: Cumulative Sum in SQL

Re: Cumulative Sum in SQL

From: Connor McDonald <connor_mcdonald_at_yahoo.com>
Date: Fri, 18 Feb 2000 18:48:59 +0800
Message-ID: <38AD239B.870@yahoo.com>


Stephane Butty wrote:
>
> Do you know how to execute a cumulative sum in SQL ?

I think such things are available in native SQL from 8.1.6. upwards. Before that you can use an inline view to to do...

Example

select bytes / tot_bytes
from dba_free_space,
  ( select sum(bytes) tot_bytes
    from dba_free_space )
etc etc

--



Connor McDonald
http://www.oracledba.co.uk

"Beta, n: Latin for 'still does not work'" Received on Fri Feb 18 2000 - 04:48:59 CST

Original text of this message

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