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 to pass a cursor variable to a procedure?
what is the use of system.effective.date variable in oracle?
What is the difference between post-database commit and post-form commit?
What are group functions in oracle?
What are the uses of linked server and explain it in detail?
What are the ansi data types supported in oracle?
How to define an anonymous procedure with variables?
What do you mean by a deadlock?
What is a initialization parameter file in oracle?
Difference between hot backup vs. Cold backup?
What do you mean by merge in oracle and how can you merge two tables?
How to loop through a cursor variable?
Assuming that you are an End User How to find that in the payment Batch some of the Invoice was Missing To pay How to find That??
Can we create trigger on materialized view in oracle?
How would you configure your networking files to connect to a database by the name of DSS which resides in domain icallinc.com?