SQL Exercises: Find the names of departments where more than two employees are working
SQL JOINS: Exercise-29 with Solution
Write a query in SQL to find the names of departments where more than two employees are working.
Sample table: emp_details
SELECT emp_department.dpt_name FROM emp_details INNER JOIN emp_department ON emp_dept =dpt_code GROUP BY emp_department.dpt_name HAVING COUNT(*) > 2;
Have another way to solve this solution? Contribute your code (and comments) through Disqus.
What is the difficulty level of this exercise?