Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cumulative sum of salary..!

685758Sep 7 2010 — edited Sep 7 2010
hi all,

I ran below query.

SELECT ENAME,SAL FROM EMP;

ename sal
--------------------------
ARVIND 60000
PC ARYA 50000
ASIT 55000
VINAY 58000
PANKAJ 56000
MANISH 45000

Now I need to fetch cumulative sum of salary of employee as below .

ename sal comulative_sum_sal
ARVIND 60000 60000
PC ARYA 50000 110000 (ex-->SUM OD 60000 & 50000)
ASIT 55000 105000 (ex-->SUM OD 50000 & 55000)
VINAY 58000 113000
PANKAJ 56000 114000
MANISH 45000 101000

kindly help me for this query.

rgds,
pc
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 5 2010
Added on Sep 7 2010
7 comments
13,449 views