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
Is there any way to find out when one specific table/view/M-view is used last time. i.e. when one specific object is used in any SELECT statement.
What are named parameters?
How to open and close an explicit cursor in oracle?
How to run the anonymous block again?
What is the meaning of recursive hints in oracle?
Explain the difference between sap and oracle?
Explain the use of indexes option in exp command.
what is IDE,DMV in sql server?
How to establish administrator authentication to the server?
What is sequence?
How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?
can anyody please send me the dump for Oracle 10g certifications for DBA path?
What is the difference between Delete, Truncate and Drop in Oracle?
Calculate difference between 2 date / times in oracle sql?
State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.