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
Does oracle database need java?
22. Display the order number, number of lines in the order, total number of items and total value for all orders that have a total value greater than $100
Illustrate how to determine the amount of physical CPUs a Unix Box possesses (LINUX and/or Solaris).
What are the parameters that we can pass through a stored procedure?
Explain an exception?
What is index in Oracle?
Is oracle the best database?
What is oracle database 10g express edition?
How to create a testing table in oracle?
i have a question here... As of my knowledge, when we apply an index (b-tree)on a column, internally it arranges the data in b-tree format and do the fetching process correspondingly... and my quetion is... How a bit-map index arranges the data internally when applied on a column?IS it in b-tree format or whatelse?
Difference between varchar and varchar2 data types?
How to use select statement to count the number of rows in oracle?
What is recovery manager in Oracle?
How can I create database in oracle?
What is the difference between a hot backup and a cold backup in oracle?