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
Can a formula column be obtained through a select statement ?
Can group functions be used in the order by clause in oracle?
What happens if the imported table already exists?
How to login to the server without an instance?
In the oracle version 9.3.0.5.0, what does each number shows?
Explain the use of Merge statement in oracle 11g
How to count groups returned with the group by clause in oracle?
Explain what are the characteristics of data files?
How to list all indexes in your schema?
What is Trigger in Oracle?
How can you tell how much space is left on a given file system and how much space each of the file systems subdirectories take-up?
When do you get a .pll extension in oracle?
Explain oracle’s server parameter file.
various types of hints and their usage
I am using an Oracle 8i Database my data contains Clob data. I am using toad version 7.6 i am able to get the data in toad but unable to extract the data in excel.when trying to extract the data into the excel the toad error says out of memory. Can any body please help me to extract the data through the same toad version. Thanks in advance