Highmark Health analysts need a state-level view of members with the highest total claim amounts. Write a PostgreSQL query to identify the top five members in each state based on the sum of their claims.
members to claims and calculate each member's total claim amount.member_id.| Column | Type | Description |
|---|---|---|
| member_idPK | INTEGER | Unique member identifier |
| member_name | VARCHAR(100) | Member's full name |
| state | VARCHAR(2) | Two-letter member state code |
| Column | Type | Description |
|---|---|---|
| claim_idPK | INTEGER | Unique claim identifier |
| member_id | INTEGER | References members.member_id |
| claim_date | DATE | Date the claim was submitted |
| claim_amount | NUMERIC(12,2) | Amount associated with the claim |