i have a table like this. i want to output like this
c1 c2 c1 c2

1 10 1 10
2 20 2 30
3 30 3 60
4 40 4 100
5 5 5 105

c1 and c2 are columns in a table .i want output like this

c2 values are 10,10+20,10+20+30,10+20+30+40.10+20+30+40+5.

write a sql query.pls help this
i want urgent.

Answer Posted / vinay

Select c1,sum(c2) over (order by c1) as C3 from T1

Is This Answer Correct ?    13 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is procedure and function in sql?

543


what is the difference between primary key and unique key? : Sql dba

537


how to create a test table in your mysql server? : Sql dba

508


What is bulk collect in pl sql?

543


What is form and report?

527






Is sql developer case sensitive?

532


Does user triggers have entry for trigger with compilation errors?

608


How do you optimize a query?

545


What is lookup table in sql?

615


How to rename a table?

568


how to select unique records from a table? : Sql dba

640


What is the command used to fetch the first 5 characters of a string?

717


How to use transactions efficiently : transact sql

556


How can triggers be used for the table auditing?

603


What does closing a cursor do?

776