Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

Can a formula column be obtained through a select statement ?

2379


Can group functions be used in the order by clause in oracle?

1043


What happens if the imported table already exists?

1076


How to login to the server without an instance?

1213


In the oracle version 9.3.0.5.0, what does each number shows?

1343


Explain the use of Merge statement in oracle 11g

1074


How to count groups returned with the group by clause in oracle?

1119


Explain what are the characteristics of data files?

1135


How to list all indexes in your schema?

1140


What is Trigger in Oracle?

1239


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?

2871


When do you get a .pll extension in oracle?

1189


Explain oracle’s server parameter file.

1038


various types of hints and their usage

2747


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

2379