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
How to use subqueries with the exists operator in oracle?
How to run create database statement?
Which dictionary view(s) would you first look at to understand or get a high-level idea of a given Advanced Replication environment?
Can you create a synonym without having a table?
How to run the anonymous block again?
Is oracle a language?
How do I know if oracle client is installed on windows?
There are n numbers of flatfile of exactly same format are placed in a folder.Can we load these flatfile's data one by one to a single relational table by a single session??
what is dynamic SGA and static SGA
How to download oracle database 10g xe?
What are advantages of dateset in datastage?
How do I reset a sequence in oracle?
How to resolve the ORA-39133 error in Oracle?
How do I recompile a procedure in oracle?
Explain the characteristics of oracle dba?