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

Answer Posted / lova raju allumalla

instead of deptno the result will give u in department name

select sum(sal),dname from emp e,dept d where
e.deptno=d.deptno group by dname
/

Is This Answer Correct ?    0 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can delete statement be rollbacked?

523


Can we use ddl statements in stored procedure sql server?

514


what tools available for managing mysql server? : Sql dba

529


what is not null constraint? : Sql dba

544


What is the current version of postgresql?

552






What is pl/sql table? Why it is used?

556


What is clause in sql?

579


how to increment dates by 1 in mysql? : Sql dba

539


What is a pl/sql block?

590


Explain the difference between 'between' & 'and' operators in sql

526


what is the difference between a local and a global temporary table? : Sql dba

551


What are the advantages of pl sql over sql?

545


What is sql rowcount?

554


What is pivot query?

591


Can you selectively load only those records that you need? : aql loader

607