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 / mukesh

select empid,
salary,
sum(salary) over(order by empid rows unbounded
preceding) composite_sal from source

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to get last row id?

941


How to create lov dynamically at runtime & attach to text field?

1099


How to execute a stored program unit?

1005


There are n numbers of flatfile of exactly same format are placed in a folder.Can we load these flatfile's data one by one to a single relational table by a single session??

1981


How to export data with a field delimiter?

971


what is meant by magic query

2137


Please explain me all types of Data models. Also give me the details if each model can have other name.for example:schematic data model is also known as conceptual data model and entity relation data model.

2262


How to check the server version in oracle?

1035


State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

978


What are joins, explain all types of joins?

2221


How to export your connection information to a file?

1076


What is translate in oracle?

1051


11. Display the client number and name and the client number and name of the person who referred that client.

2278


Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.

1291


Oracle

2321