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
what is the scripts in data base?
What do you mean by cdb and pdb in oracle 12c?
What is a package in oracle?
We are using Oracle apps with XML publisher.In that,we are facing some problems while giving a Footer in RTF Template.While giving a footer in RTF Template it is Visible in all the pages,but after the PDF is getiing generated,the Footer are Visible on alternate pages only (like on first page ,third page) and so on. Please provide the Solution for getting the Footer on all the pages.
How to run create database statement again?
What are the general rules on data consistency?
What are internal user account in oracle?
How to get the Installed Oracle Version Information ?
How to define a sub function?
Can you have more than one content canvas view attached with a window ?
Explain what are the type of synonyms?
What is difference between truncate and delete?
is there a tool to trace queries, like profiler for sql server?
Difference between inner join vs where ?
Differentiate between function and procedure in oracle.