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
Explain the properties of subqueries in sql server?
How do I find the query plan in sql server?
Can we perform backup restore operation on tempdb? : sql server database administration
What is the difference between writing data to mirrored drives versus raid5 drives
Which language rdl files made of?
What are audit control procedures?
What is the rdl file?
Explain the creation and execution of a user-defined function in the sql server?
What is sharding?
Can two different columns be merged into single column? Show practically?
what is the difference between a primary key and a unique key? : Sql server database administration
The external application that is executed in one of the tasks does not have a log file, but only a screen log. How can I save the data from the screen? : sql server management studio
What is difference between views and tables?
What is difference between inner join and full join?
IF more than one Site is accessing the same Database server and I want to move the DB with Minimum down time? How will you do