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
Can ddl statements be used in pl/sql?
what is index? : Sql dba
What is a sql schema used for?
how many ways to get the current time? : Sql dba
What are hotfixes and patches?
What are the rules to be applied to nulls whilst doing comparisons?
What are the ddl commands?
What is t-sql? : Transact sql
What is rank dense_rank and partition in sql?
What is character functions?
How to look at the current sql*plus system settings?
What is sql table?
What is auto increment in sql?
Why left join is used in sql?
how to get a list of indexes of an existing table? : Sql dba