Describe a time you had to refactor a slow-performing query at Candid Health.
For this exercise, demonstrate the refactored PostgreSQL query against the provided claims data. Limit the analysis to claims submitted during 2024 and return monthly payer-level operational metrics.
Output
- One row per payer and submission month
- Columns:
payer_name, submission_month, submitted_claims, resolved_claims, total_paid, denial_rate_pct, and prior_month_paid
- Include claims with no payment or incomplete payer details
- Sort by payer name ascending, with missing payer names last, then submission month ascending