Chapter 3 · Sorting & Limiting
20. Doctors in a Salary Range
Easy10 XPHealthcare
HR needs to identify mid-range earners. Find all doctors whose salary is between 200000 and 350000 (inclusive). Return their first name, last name, specialty, and salary, ordered by salary 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.