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

Answer Posted / vikneswaran

SELECT deptno,SUM(sal) FROM emp
GROUP BY deptno

Is This Answer Correct ?    12 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are all the different normalization?

560


What is a column in a table?

548


What is left join in postgresql?

538


how can we optimize or increase the speed of a mysql select query? : Sql dba

504


How do I filter in sql profiler?

534






how would you get the current date in mysql? : Sql dba

537


How do we accept inputs from user during runtime?

546


What does the base_object_type column shows in the user.triggers data dictionary view?

570


What is implicit cursor in pl sql?

537


Show how functions and procedures are called in a pl/sql block.

586


What is string data type in sql?

531


Why do we use sqlite?

529


what is a unique key ? : Sql dba

541


explain advantages of innodb over myisam. : Sql dba

646


Can you have more than one trigger on a table?

530