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
What are indexers?
How many types of keys are there?
What is the difference between a "where" clause and a "having" clause?
If the job running very slow what is the action you do
List the different types of joins?
How much space does sql server 2016 take?
Why I have to use stored procedures?
What are the properties of the transactions?
Tell me about the approaches which you used to counter the DI problems.
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
Why are views required in the sql server or in any other database?
What is a bit datatype?
What are the new features of sql server 2008 r2 reporting service?
What is transaction server distributed transaction?
What are the different kinds of ssrs reports?