Skip to main content
All Problems
medium0% acceptance

Departments with Above-Average Doctor Count

Show how many doctors each department has. Return department name, doctor_count, and the department's budget. Only include departments with at least 5 doctors. Order by doctor_count descending, then by department name.

Schema

🔑idINT
first_nameTEXT
last_nameTEXT
specialtyTEXT
🔗department_idINT
emailTEXT
phoneTEXT
hire_dateTEXT
salaryREAL
postgresql

Run your query to see results

Press Ctrl + Enter to execute