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

What is the oracle implicit cursor?

562


What is the dynamic sql in oracle?

563


What is the scope of a local variable?

561


When do you get a .pll extension in oracle? Explain its importance

543


what are steps for interface? where is exchange rate defined in which table?

1458






How do I recompile a procedure in oracle?

502


What is an oracle recycle bin?

523


How to retrieve data from an cursor to a record?

540


What is a procedure in oracle?

590


Explain coalesce function?

602


What is the usage of control file in oracle?

583


How to speed up webrick?

569


master table and child table performances and comparisons in Oracle ?

1640


Explain the different normalization forms?

570


How to import one table back from a dump file?

567