write sql query following source are
EmpID, Salary
101 1000
102 2000
103 3000
I want the output format like following
empid,sal,composite_sal
101 1000 1000
102 2000 3000
103 3000 6000
Answer Posted / farrukh shaikh
select empid,
salary,
sum(salary) over(order by empid rows unbounded
preceding) composite_sal from (select 101 EmpID, 1000
Salary
from dual
union all
select 102, 2000
from dual
union all
select 103, 3000
from dual
union all
select 110, 5000 from dual)
| Is This Answer Correct ? | 0 Yes | 1 No |
Post New Answer View All Answers
HI, Please let me know the syllabus for Oracle OCA and OCP Certification
How to experiment a data lock in oracle?
What is a view and how is it different from a table?
How to open and close an explicit cursor in oracle?
How to commit the current transaction in oracle?
ABOUT IDENTITY?
What is a oracle database?
you are a universe designer and report developer in BO, what type of information you gather from client?Briefly explain plz
Explain cascading triggers.
What the is the diff between local index and global index. give some example.
How do I reset a sequence in oracle?
What is data file?
You have 4 instances running on the same UNIX box. How can you determine which shared memory and semaphores are associated with which instance?
A table t is there.If you perform insert ,update and delete then the trigger will fire.What is the minimum no of trigger required for a table.
How to use "out" parameter properly?