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...

hi friends please answer this question ASAP:-
how to count the no. of employee in a each department
or
no. of employee in each location by using emp/dept table

Answer Posted / ramandeep singh

SELECT Dept_Name, dept.Dept_ID, COUNT(*) AS 'no. of
employees' FROM dept
LEFT JOIN emp ON emp.Dept_ID = dept.Dept_ID
GROUP BY dept.Dept_ID, Dept_Name

Is This Answer Correct ?    2 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are indexers?

1131


How many types of keys are there?

1073


What is the difference between a "where" clause and a "having" clause?

1210


If the job running very slow what is the action you do

1942


List the different types of joins?

1057


How much space does sql server 2016 take?

1033


Why I have to use stored procedures?

1094


What are the properties of the transactions?

1169


Tell me about the approaches which you used to counter the DI problems.

1427


Is it true that rules do not apply to data already existing in a database at the time the rule is created?

1085


Why are views required in the sql server or in any other database?

1000


What is a bit datatype?

1021


What are the new features of sql server 2008 r2 reporting service?

212


What is transaction server distributed transaction?

1126


What are the different kinds of ssrs reports?

221