Hi
I have similar to the following tables
1) Departments
Dep_ID,Dep_name ,Dep_Loc
2) Employees
Emp_ID,Emp_Name ,Dep_ID
the first table includes these records
Dep_ID Dep_name Dep_Loc
------------------------
10 Finance USA
20 Drilling USA
while the otehr table
Emp_ID Emp_Name Dep_ID
----------------------------------------
222309 Johan 10
222338 Steve 10
223443 Culen 20
233456 Martin 20
233456 Clap 20
the question now is how to create a query which count
all employees in each department. I want the query result in:
Dep_ID Dep_name Dep_Loc Total
------------------------------
10 Finance USA 2
20 Drilling USA 3
I have similar to the following tables
1) Departments
Dep_ID,Dep_name ,Dep_Loc
2) Employees
Emp_ID,Emp_Name ,Dep_ID
the first table includes these records
Dep_ID Dep_name Dep_Loc
------------------------
10 Finance USA
20 Drilling USA
while the otehr table
Emp_ID Emp_Name Dep_ID
----------------------------------------
222309 Johan 10
222338 Steve 10
223443 Culen 20
233456 Martin 20
233456 Clap 20
the question now is how to create a query which count
all employees in each department. I want the query result in:
Dep_ID Dep_name Dep_Loc Total
------------------------------
10 Finance USA 2
20 Drilling USA 3
Comment