Which Department has MOST NUMBER of employees?
Answer Posted / shibashis
Select d.deptname,count(*) as cnt
from employee e inner join dept d
On e.deptid=d.deptid
group by d.deptname
having cnt in (
select max(cnt) from
(SELECT deptid ,count(*) as cnt FROM employee GROUP BY deptid )
)
order by d.deptname
;
| Is This Answer Correct ? | 1 Yes | 7 No |
Post New Answer View All Answers
What is oracle instant client?
How do you increase the OS limitation for open files (LINUX and/or Solaris)?
How do you get nicely formatted results from an oracle procedure that returns a reference cursor?
What is raw datatype in oracle?
What is enter substitution variable in oracle?
What are the different windows events activated at runtime ?
How to update a table row with a record?
What do you understand by a database object? Can you list a few of them?
Will you be able to store pictures in the database?explain.
How to invoke the data pump import utility?
Explain the use of log option in exp command.
How can we delete duplicate rows in a table?
What do you mean by group by clause?
Explain an exception and its types?
How can we find out the current date and time in oracle?