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 can windows applications connect to oracle servers?
How do we get field details of a table?
6. Display the client name and order date for all orders using the traditional method.
How to end the current transaction in oracle?
Which is faster join or subquery in oracle?
What is object data modeling?
query optmization techniques and quwry analyser+projects+ppts
What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?
Explain implicit cursor.
How would you change old and new values in an insert, delete and update triggers?
What is archive log in Oracle?
How to upsert (update or insert into a table)?
What is a cursor in oracle?
What are the four Oracle system processes that must always be up and running for the database to be useable?
How to empty your oracle recycle bin?