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
How to create a testing table with test data in ms sql server?
What is difference statement and preparedstatement?
What is a constant or literal in ms sql server?
What is the difference between ROW_NUMBER and Ranking function in SQL SERVER?
How can you list all the table constraints in a database?
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?
What is raid and what are different types of raid levels?
what types of replication are supported in sql server? : Sql server database administration
How exceptions can be handled in sql server programming?
List the different normalization forms?
How do I completely remove sql server instance?
Which autogrowth database setting is good?
what is a self join? Explain it with an example? : Sql server database administration
What are the different types of columns types constraints in the sql server?
Explain about nested stored procedure?