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

Difference between varchar and varchar2 data types?

1158


What are the original export and import utilities?

1140


Explain coalesce function?

1180


How to convert raw data type into text in oracle? Explain

982


What is instant client oracle?

1012


What is set verify off in oracle?

1078


How to see the table columns used in an index?

1007


Typically, where is the conventional directory structure chosen for Oracle binaries to reside?

2122


How to define an oracle sub procedure?

1120


How to convert characters to dates in oracle?

1078


Tab A A B ------ 1 A 2 B 3 C Tab B A B ----- 4 D 5 E 6 F Generate the value into B table from A table. Only table A has the value. Write the SQL query to get B table value.

1766


What is a system tablespace?

1051


Explain the use of control file?

1096


How to convert csv to table in oracle?

976


How to change user password in oracle?

1009