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

How to create a testing table with test data in ms sql server?

1088


What is difference statement and preparedstatement?

988


What is a constant or literal in ms sql server?

1050


What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?

1151


How can you list all the table constraints in a database?

941


You have developed an application which uses many stored procedures and triggers to update various tables users ocassionally get locking problems which tool is best suited to help you diagnose the problem?

1008


What is raid and what are different types of raid levels?

1156


what types of replication are supported in sql server? : Sql server database administration

1050


How exceptions can be handled in sql server programming?

1019


List the different normalization forms?

986


How do I completely remove sql server instance?

1107


Which autogrowth database setting is good?

1065


what is a self join? Explain it with an example? : Sql server database administration

956


What are the different types of columns types constraints in the sql server?

1081


Explain about nested stored procedure?

1039