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 primary key sql?

1037


How do I kill a query in postgresql?

1127


Why stored procedure is faster than query?

1062


How to convert comma separated string to array in pl/sql?

1184


What is database white box testing and black box testing?

1111


What are the parts of a sql statement?

1090


How can you select unique records from a table?

1077


What is sharding in sql?

985


What is an exception in PL/SQL? What are the two types of exceptions?

1311


What is the difference between microsoft access and sql?

1023


Explain select statements in sql?

1057


Can a composite key be null?

978


What is sql performance tuning?

918


How can you tell the difference between an index and a view?

937


What are functions in sql?

956