Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

How can windows applications connect to oracle servers?

1041


How do we get field details of a table?

972


6. Display the client name and order date for all orders using the traditional method.

2293


How to end the current transaction in oracle?

1018


Which is faster join or subquery in oracle?

976


What is object data modeling?

942


query optmization techniques and quwry analyser+projects+ppts

2404


What do the 9i dbms_standard.sql_txt() and dbms_standard.sql_text() procedures do?

4504


Explain implicit cursor.

1004


How would you change old and new values in an insert, delete and update triggers?

1001


What is archive log in Oracle?

1117


How to upsert (update or insert into a table)?

989


What is a cursor in oracle?

1163


What are the four Oracle system processes that must always be up and running for the database to be useable?

995


How to empty your oracle recycle bin?

1015