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
What are the constraints available in sql?
how to load data files into tables with 'mysqlimport'? : Sql dba
Is truncate ddl or dml?
How can you get sql*loader to commit only at the end of the load file? : aql loader
Can we use commit inside a trigger?
How do I find sql profiler?
What is denormalization in a database?
Explain the working of primary key?
What is server name sql?
Is primary key always clustered index?
what is a composite key ? : Sql dba
What are all the different types of indexes?
what are null values? : Sql dba
What is difference between procedure and trigger?
Can dml statements be used in pl/sql?