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

Answer Posted / madhusudan darshannkar

SELECT COUNT(EID) AS EMPLOYEE,DEPTNON,SUM(SALARY) FROM
EMPLOYEE GROUP BY DEPTNO

Is This Answer Correct ?    4 Yes 12 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is group function in sql?

540


what are the performance and scalability characteristics of mysql? : Sql dba

532


What is the difference between delete, truncate and drop command?

552


What port does sql server use?

510


Why is %isopen always false for an implicit cursor?

569






What is an intersect?

655


what is column? : Sql dba

574


Which is faster view or stored procedure?

505


How do I clear the screen in sql plus?

551


What are predefined functions in sql?

535


Can we call a function containing dml statements in a select query?

546


Is pl sql and postgresql same?

573


what are the differences between char and nchar? : Sql dba

595


how to shut down the server with 'mysqladmin'? : Sql dba

549


What does fetching a cursor do?

615