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
How many types of auditing in Oracle?
How to do paging with oracle?
What is oracle and what are its different editions?
If youre unsure in which script a sys or system-owned object is created, but you know its in a script from a specific directory, what UNIX command from that directory structure can you run to find your answer?
What is not equal to in oracle?
what are steps for interface? where is exchange rate defined in which table?
What is null value in oracle?
Explain a segment?
ur a sql devoloper...what is the process in ur company for finding the database BUGS .. seperate DB testers are there? or devr.s are manage? if DB TESTERS in there what is the process
Explain an index?
How can I create database in oracle?
How can you merge two tables in oracle?
What is a Garbage Collection? and what is full recursive Garbage collection?
Is oracle an operator?
ABOUT IDENTITY?