Write a SQL query to retrieve and aggregate patient data from multiple relational tables.
Return active patients and summarize qualifying completed visits occurring during calendar year 2025. Include patients without qualifying visits, and treat missing aggregate values as zero where appropriate.
Output
- One row per active patient with the patient ID and name.
- Include visit count, total charges, distinct diagnosis count, and latest qualifying visit date.
- Order by total charges descending, then patient ID ascending.