001Level 1

Chapter 3 · Sorting & Limiting

26. Prescriptions with Zero Refills

Easy10 XPHealthcare

The pharmacy wants to identify one-time prescriptions that have no refills. Return the medication, dosage, frequency, and start_date for prescriptions where refills is 0, ordered by start_date 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.

Peek at the solution?

You can still earn the XP afterwards by submitting a working query — but you'll learn more if you give it one more try.