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 -> Group by question...

Group by question...

From: <kevinmz_at_my-deja.com>
Date: Thu, 17 Jun 1999 12:50:06 GMT
Message-ID: <7kaqtq$i1b$1@nnrp1.deja.com>


I need my brain unscrambled by some Oracle whiz-kids!

I have a table with values:

Amount MonthYear
------ ---------

100       Dec-1996
223       Jan-1997
123       Jun-1997

etc...

How do I get a cumulative total for each row that includes all the values for the current row and all previous rows (sorted by date).

Example:
Amount MonthYear Cumulative
------ --------- ----------

100       Dec-1996     100
223       Jan-1997     323
123       Jun-1997     446

etc.

I have just about scrambled my brains trying to figure this one out.

Thanks in advance.
Kevin.

Sent via Deja.com http://www.deja.com/
Share what you know. Learn what you don't. Received on Thu Jun 17 1999 - 07:50:06 CDT

Original text of this message

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