Chapter 3 · Sorting & Limiting
23. Prescriptions with High Refill Counts
Easy10 XPHealthcare
The controlled substances team wants to audit prescriptions with many refills. Find all prescriptions where refills >= 5. Return medication, dosage, frequency, and refills, ordered by refills descending.
Tables
- PKidINT
- FKvisit_id→ visits.idINT
- medicationTEXT
- dosageTEXT
- frequencyTEXT
- start_dateTEXT
- end_dateTEXT
- refillsINT
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.