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 rename in sql?

979


Can sql developer connect to db2?

1058


What are the popular database management systems in the it industry?

1005


What is a temporal table?

936


How do you delete duplicates in sql query using rowid?

954


how many values can the set function of mysql take? : Sql dba

997


what is the difference between ereg_replace() and eregi_replace()? : Sql dba

1166


What is the syntax to add a record to a table?

1098


What is procedure function?

1071


Can we call dml statement in function?

1065


What can you do with pl sql?

1101


What is synonyms?

1063


How do I clear the screen in sql plus?

1051


What do you mean by dbms? What are its different types?

1025


What does select count (*) mean in sql?

1025