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 are the constraints available in sql?

1013


how to load data files into tables with 'mysqlimport'? : Sql dba

1058


Is truncate ddl or dml?

952


How can you get sql*loader to commit only at the end of the load file? : aql loader

981


Can we use commit inside a trigger?

1048


How do I find sql profiler?

898


What is denormalization in a database?

1007


Explain the working of primary key?

1058


What is server name sql?

1092


Is primary key always clustered index?

963


what is a composite key ? : Sql dba

1006


What are all the different types of indexes?

1105


what are null values? : Sql dba

913


What is difference between procedure and trigger?

937


Can dml statements be used in pl/sql?

1038