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 / shibashis

Select d.deptname,count(*) as cnt
from employee e inner join dept d
On e.deptid=d.deptid
group by d.deptname
having cnt in (
select max(cnt) from
(SELECT deptid ,count(*) as cnt FROM employee GROUP BY deptid )
)
order by d.deptname
;

Is This Answer Correct ?    1 Yes 7 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is oracle instant client?

973


How do you increase the OS limitation for open files (LINUX and/or Solaris)?

1879


How do you get nicely formatted results from an oracle procedure that returns a reference cursor?

1010


What is raw datatype in oracle?

1052


What is enter substitution variable in oracle?

985


What are the different windows events activated at runtime ?

2835


How to update a table row with a record?

962


What do you understand by a database object? Can you list a few of them?

971


Will you be able to store pictures in the database?explain.

931


How to invoke the data pump import utility?

1082


Explain the use of log option in exp command.

1049


How can we delete duplicate rows in a table?

929


What do you mean by group by clause?

979


Explain an exception and its types?

1012


How can we find out the current date and time in oracle?

1037