Chapter 4 · Aggregations
32. Top 10 Most Prescribed Medications
Easy10 XPHealthcare
The pharmacy wants to know which medications are prescribed most often. Return the medication name and its prescription count for the top 10 most-prescribed medications, most prescribed first. If medications tie on count, order them alphabetically.
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.