I have a table for employees and another for department names. The constructions are
employees - employee_id - employee_name - department_id
departments - department_id - department_name
I want to show a table with department names where more than 10 employees work.
The query I tried without results is:
select count(*) as count,d.department_name
from employees e
inner join departments d on e.department_id = d.department_id
where count(*) > 5
group by d.department_name
please suggest correction