Cumulative value [message #370811] |
Thu, 10 February 2000 13:39  |
newcomer
Messages: 3 Registered: February 2000
|
Junior Member |
|
|
pno value
1 100
2 200
3 50
i want a sel st which will produce output like
1 100
2 300
3 350
|
|
|
Re: Cumulative value [message #370820 is a reply to message #370811] |
Fri, 11 February 2000 01:33  |
kumaresan
Messages: 3 Registered: February 2000
|
Junior Member |
|
|
Hi,
This is type of running total.
Let us take example of following structure
Table name : run_tot
c1 c2
1 100
2 200
3 50
SELECT A.C1, A.C2,SUM(B.C2) RUNTOT
FROM RUN_TOT A, RUN_TOT B
WHERE A.C1 >= B.C1
GROUP BY A.C1,A.C2;
The above query will satisfy your requirements.
Regards,
Kumaresan
|
|
|