I have a Employee table with columns
ename,eid,salary,deptno. How to retrieve sum of salary for
each deptno?

Answer Posted / kavithanedigunta

select deptno,sum(sal) from employee
group by deptno;

Is This Answer Correct ?    72 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to disable a trigger name update_salary?

678


C. Normalize the following data up to the 3rd Normal form. Create the tables and insert the data given. Emp_ID Name Dept_Name Salary Course_Title Date_Completed 100 Adam Marketing 48,000 SPSS 6/19/2008 Surveys 10/7/2008 140 Bob Accounting 52,000 Tax Acc 12/8/2008 110 Cathy IT SQL Server 1/12/2008 C# 4/22/2008 190 Dan Finance 150 Emily Marketing 55,000 SPSS 6/16/2008 42,000 Analysis 8/12/2008 Queries 1. Find all Names who have completed the SPSS Course. 2. Find employee with max salary. 3. Find employee with 2nd max salary. 4. Find all employees in Dept “Marketing”. 5. Find all the employees who have taken more than 2 courses. 6. Find all the employees who have completed the courses before month of September.

2173


What is the importance of sqlcode and sqlerrm?

851


How to add new employee details in an employee_details table with the following details

647


Is left join faster than join?

549






How does rowid help in running a query faster?

970


list out some tools through which we can draw e-r diagrams for mysql. : Sql dba

513


how to delete duplicate rows from a join tables(I have three tables on that join) how do you know which join is need to be used? The select statement I have is: SELECT gc_skill_type.skill_type, gc_area_tec.area, gc_technology.technology, gc_technology.id_technology, gc_area_tec.id_area_tec FROM gc_skill_type, gc_area_tec, gc_technology WHERE gc_area_tec.id_skill_type (+) = gc_skill_type.id_skill_type AND gc_technology.id_area_tec (+) = gc_area_tec.id_area_tec order by gc_skill_type.skill_type asc, gc_area_tec.area asc, gc_technology.technology asc

3241


What is procedure explain with example?

542


What is cartesian join in sql?

559


What is a sql select statement?

571


what is union, minus and interact commands? : Sql dba

661


what is text? : Sql dba

564


How would you reference column values before and after you have inserted and deleted triggers?

622


What is string data type in sql?

535