Departments with 100+ Employees
Given schema:
Emp(eid, ename, age, salary)Works(eid, did, pct_time)Dept(did, dname, budget, managerid)
Find departments with more than 100 employees. Complete the query:
SELECT did, COUNT(DISTINCT eid) as num_employees
FROM _____
GROUP BY did
HAVING COUNT(DISTINCT eid) > 100;
Sign in to answer questions and track your progress
Sign In