Chapter 4 · Aggregations
38. Average Billing Amount by Status
Easy10 XPHealthcare
Finance wants to understand billing patterns. Calculate the average billing amount for each billing status. Return status and avg_amount (rounded to 2 decimal places), ordered by avg_amount 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.