Chapter 4 · Aggregations
33. Departments with More Than 4 Doctors
Easy10 XPHealthcare
Management wants to identify large departments. Find all department_id values that have more than 4 doctors. Return the department_id and the doctor count.
Tables
- PKidINT
- first_nameTEXT
- last_nameTEXT
- specialtyTEXT
- FKdepartment_id→ departments.idINT
- emailTEXT
- phoneTEXT
- hire_dateTEXT
- salaryREAL
Need help?
Ask Sol
AI tutor — looks at your current query and nudges you, without spoiling the answer.
Solution
Try the hints first — solving it yourself is what makes it stick.