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 many objectname will be created for a single table drop function? Why 'flashback' query giving error "ORA-38312: original name is used by an existing object" while getting the table?

2263


Explain a data segment?

1071


How to create a table in a specific tablespace?

976


Who developed oracle & when?

1004


How to sort output in descending order in oracle?

1046


How many data types are supported?

1080


What are the restrictions on external table columns?

1054


What is the cache hit ratio, what impact does it have on performance of an Oracle database and what is involved in tuning it?

2134


Is java required for oracle client?

1001


How to declare a local variable?

1120


What is the disadvantage of User defind function?

2294


Is oracle an open source?

1081


How to write a left outer join with the where clause in oracle?

1085


How to import one table back from a dump file?

1025


What is a proxy class?

1055