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 is primary key sql?
How do I kill a query in postgresql?
Why stored procedure is faster than query?
How to convert comma separated string to array in pl/sql?
What is database white box testing and black box testing?
What are the parts of a sql statement?
How can you select unique records from a table?
What is sharding in sql?
What is an exception in PL/SQL? What are the two types of exceptions?
What is the difference between microsoft access and sql?
Explain select statements in sql?
Can a composite key be null?
What is sql performance tuning?
How can you tell the difference between an index and a view?
What are functions in sql?