Chapter 4 · Aggregations
31. Total Billing Amount by Status
Easy10 XPHealthcare
The billing department wants to see the total billed amount grouped by billing status. Return each status and the sum of amount, rounded to two decimal places, ordered by total descending.
Tables
- PKidINT
- FKvisit_id→ visits.idINT
- amountREAL
- insurance_coveredREAL
- patient_responsibilityREAL
- statusTEXT
- billed_atTEXT
- paid_atTEXT
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.