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 / ezhumalai

select d.dept_ID ,count(empid) from Emp a inner join Department b
on a.empid=b.empid
group by d.dept_ID

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Do you know sql server 2008 backup compression?

654


Explain relational data?

632


How to insert multiple rows with a subquery?

626


What is the need for indexing?

578


Define primary key?

764






Explain about sql server login?

690


What are the different types of subquery?

712


How to turn on the mssql api module in php?

664


How can we remove orphan records from a table?

624


what is a join? : Sql server database administration

639


How dts is used to extract, transform and consolidate data?

671


What is the difference between a clustered index and a non-clustered index?

617


Do you know hot add cpu in sql server 2008?

628


What is sql server schema compare? How we can compare two database schemas?

664


How to list all user names in a database?

669