Which Department has MOST NUMBER of employees?

Answer Posted / cvsrao

select d.deptname, count(*) as cnt from Employee e inner join
Department d on e.DeptId=d.DeptID
group by DeptName
having count(*) in
(select count(*) from
(select DeptId, count(*) as cnt from Employee group by DeptId)as cnt)

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Where do you use decode and case statements?

556


What are the database administrators utilities available?

580


What privilege is needed for a user to query tables in another schema?

509


Explain oracle insert into command?

632


Explain an index?

658






what are the default admin accounts in Oracle 10g ?

508


What is the sid in oracle?

538


What are ddl statements in oracle?

592


How to check your oracle database 10g xe installation?

581


How to create a stored program unit?

583


What is an oracle tablespace?

608


Explain the difference between a procedure and a function? What do you understand by those terms?

624


What happens in oracle commit?

572


Which are the five query types available in oracle?

532


State some uses of redo log files?

566