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 auto increment in sql?

589


What is a natural join sql?

515


Can you have more than one trigger on a table?

532


How can we store rows in PL/SQL using array?

669


What is sql lookup?

516






What is sql profiling in oracle?

551


What is the use of prepared statement?

542


What is a mutating table and a constraining table?

575


what is 'mysqladmin' in mysql? : Sql dba

536


How to run sql functions in pl/sql?

544


Can we use two order by clause in query?

548


What is a sql*loader control file?

622


explain what is mysql? : Sql dba

602


How do you take the union of two tables in sql?

517


Difference between truncate, delete and drop commands?

561