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...

I have a Employee table with columns
ename,eid,salary,deptno. How to retrieve sum of salary for
each deptno?

Answer Posted / sudarsan

SELECT
DeptNo AS Department,
Count(DeptNo) AS Dept_Count,
Sum(Salary) AS Salary_DeptWise FROM Employee
GROUP BY DeptNo

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is trigger with example?

1012


Are views faster than queries?

917


What is the size of partition table?

990


Cite the differences between execution of triggers and stored procedures?

1028


What is a unique key?

1003


what does myisamchk do? : Sql dba

961


Is the primary key an index?

981


What is forward declaration in pl sql?

1006


Why do we go for stored procedures?

994


What is pl sql and why it is used for?

1070


What is embedded sql in db2?

956


Can we join two tables without common column?

929


How to set up sql*plus output format in oracle?

974


Explain some predefined exceptions.

990


How to pronounce postgresql?

1006