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 is a periodical index?
Can we write a distributed query and get some data which is located on other server and oracle database?
as a general practice, it is recommended to have dbo be the owner of all database objects however, in your database you find number of tables owned by a user other than dbo, how could you fix this? : Sql server administration
Explain what is sql server english query?
What command must you use to include the not null constraint after a table has already been created?
What is the usage of sign function?
You have a table with close to 100 million records recently, a huge amount of this data was updated now, various queries against this table have slowed down considerably what is the quickest option to remedy the situation?
What are the restrictions applicable while creating views? : SQL Server Architecture
how to create “alternate row colour”?
Do you know exporting and importing utility?
Explain various On-Delete options in a DB table. Which is the default option?
What does asynchronous call backs means?
What is sql profiler. What are the default templates with it? : sql server database administration
How will you hide an attribute? : sql server analysis services, ssas
what are defaults? Is there a column to which a default can't be bound? : Sql server database administration