Chapter 4 · Aggregations
42. Doctor Count per Specialty
Easy10 XPHealthcare
Hospital leadership wants a breakdown of how many doctors practice in each specialty. Return each specialty and the number of doctors, sorted by doctor count descending.
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.