Hi, I am new to the world of SQL and I have been trying to do a query and I was just wondering what I am doing wrong?
Printable View
Hi, I am new to the world of SQL and I have been trying to do a query and I was just wondering what I am doing wrong?
select department, count(*) as Number# from
(
select a.departmentname as department,b.staffid from
department a, staff b where
a.dept_id=b.dept_id
) as mytable group by department