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

Can ddl statements be used in pl/sql?

1119


what is index? : Sql dba

988


What is a sql schema used for?

1077


how many ways to get the current time? : Sql dba

988


What are hotfixes and patches?

928


What are the rules to be applied to nulls whilst doing comparisons?

1308


What are the ddl commands?

989


What is t-sql? : Transact sql

966


What is rank dense_rank and partition in sql?

1006


What is character functions?

1044


How to look at the current sql*plus system settings?

1134


What is sql table?

950


What is auto increment in sql?

1096


Why left join is used in sql?

958


how to get a list of indexes of an existing table? : Sql dba

947