Chapter 4 · Aggregations
30. Visit Count by Status
Easy10 XPHealthcare
Operations wants a breakdown of visit outcomes. Count the number of visits for each status value (scheduled, completed, cancelled, no_show), sorted by visit count (highest first).
Tables
- PKidINT
- FKpatient_id→ patients.idINT
- FKdoctor_id→ doctors.idINT
- visit_dateTEXT
- diagnosisTEXT
- notesTEXT
- follow_up_dateTEXT
- statusTEXT
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.