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

Explain the steps needed to create the scheduled job?

1091


What is the starting oracle error number? What is meant by forward declaration in functions?

1041


Why do we use procedures in pl sql?

1072


how to delete an existing column in a table? : Sql dba

1060


What is an inconsistent dependency?

1086


What are inner outer left and right joins in sql?

1058


How do you define a foreign key?

1063


what is the difference between clustered and non clustered index in sql? : Sql dba

1187


Which is faster truncate or drop?

1098


Which constraints we can use while creating database in sql?

1120


What is cursor status?

1236


When sql appeared?

1148


Does truncate require commit?

1032


What do you mean by query optimization?

1050


What is trigger and types?

1069