Which Department has MOST NUMBER of employees?
Answer Posted / mady
In SQL Server / MS Access:
==========================
select top 1 department_name
from EMPLOYEES
join DEPARTMENTS
on EMPLOYEES.department_id=DEPARTMENTS.department_id
group by department_name
order by count(*) desc;
In My SQL:
============
select department_name
from EMPLOYEES
join DEPARTMENTS
on EMPLOYEES.department_id=DEPARTMENTS.department_id
group by department_name
order by count(*) desc
limit 1;
Is This Answer Correct ? | 24 Yes | 29 No |
Post New Answer View All Answers
What is Undo Management Advisor in Oracle?
What to do if dba lost the system password?
ABOUT IDENTITY?
Is it possible to split the print reviewer into more than one region ?
How to use existing values in update statements using oracle?
What is the usage of merge statement?
what is the use of system.effective.date variable in oracle?
How to concatenate two text values in oracle?
Can you tell me how to add new column in existing views?how?How is possible?
How to use null as conditions in oracle?
How to define a data source name (dsn) in odbc manager?
What are the oracle differences between nvl and coalesce
List out the difference between commit, rollback, and savepoint?
Explain what are the advantages of views?
Why do you use stored procedures and state some of its disadvantages?