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

How is a process of pl/sql compiled?

598


What is error ora-01000: maximum open cursors exceeded

598


What is an alias command?

569


What is java sql drivermanager?

545


What is the sql case statement?

574






why does the selected column have to be in the group by clause or part of an aggregate function? : Sql dba

556


How do I count rows in sql query?

491


What is sql injection owasp?

546


What are different types of sql?

560


Which are the different character-manipulation functions in sql?

545


How to assign sql query results to pl sql variables?

507


what is the command line end user interface - mysql? : Sql dba

501


How does one use sql*loader to load images, sound clips and documents? : aql loader

668


Explain constraints in sql?

569


i have 2 table table one 4 columns respective values a1 7,a2 6,a3 8 ,a4 12 & table two 4 colums respective values a1 7,a2 6,a3 8,a4 15.if table one & table two 3 colums same then 4th column values 1)Qes diff >5 then print 5 * diff value 2)Que diff <5 print 5

3195