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

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

550


Is pl sql useful?

537


What is update query?

547


What is the difference between distinct and unique in sql?

466


hi,i plan to put experience on PLSQL ,can anyone suggest me for any institutes in bangalore or how to prepare for interviews

1521






How do I turn a list into a table?

504


What is sorting in sql?

501


How many types of privileges are available in sql?

735


What does t sql mean?

532


What is the size of partition table?

551


how can we destroy the session, how can we unset the variable of a session? : Sql dba

543


What does trigger mean in slang?

523


How many types of index are there?

548


What is a schema sql?

529


What is where clause in sql?

530