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

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.

1291


What are named parameters?

1035


How to open and close an explicit cursor in oracle?

1003


How to run the anonymous block again?

1066


What is the meaning of recursive hints in oracle?

995


Explain the difference between sap and oracle?

975


Explain the use of indexes option in exp command.

1066


what is IDE,DMV in sql server?

2754


How to establish administrator authentication to the server?

984


What is sequence?

1012


How i can handle exception in large code like 1000 line without distrubing the code or without exception handler sction?

3155


can anyody please send me the dump for Oracle 10g certifications for DBA path?

2090


What is the difference between Delete, Truncate and Drop in Oracle?

1068


Calculate difference between 2 date / times in oracle sql?

987


State the difference along with examples between Oracle 9i, Oracle 10g and Oracle 11i.

978