Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.tools -> Cumulative query
I'm trying to write a cumulative query on a table that looks like this.
createdate, itemid
If the table would be filled with the following data:
01-01-2000 1 01-01-2000 2 01-01-2000 3 02-01-2000 4 02-01-2000 5 03-01-2000 6 04-01-2000 7 04-01-2000 8
With the simple query by day (select count(*) from table group by createdate) I would get the number of items created on every date.
I would however like to have a cumulative result, so:
Date Number of items
01-01-2000 3 02-01-2000 5 <3+2> 03-01-2000 6 <3+2+1> 04-01-2000 8 <3+2+1+2>
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Aug 16 2000 - 04:21:59 CDT
![]() |
![]() |