Your question is SQL Query for Max Value. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Alegeus needs to review the largest approved reimbursement claims across benefit categories. Write a PostgreSQL query that returns every claim tied for the maximum eligible amount in its category.
The data includes tied maximums, denied claims, inactive members, unmatched members, null amounts, zero amounts, and claims outside the requested year.
| Column | Type | Description |
|---|---|---|
| category_idPK | INT | Benefit category identifier |
| category_name | VARCHAR(40) | Alegeus benefit category name |
| Column | Type | Description |
|---|---|---|
| member_idPK | INT | Member identifier |
| member_name | VARCHAR(100) | Member display name |
| is_active | BOOLEAN | Whether the member is currently active |
| Column | Type | Description |
|---|---|---|
| claim_idPK | INT | Claim identifier |
| category_id | INT | Referenced benefit category |
| member_id | INT | Referenced member |
| claim_status | VARCHAR(20) | Claim processing status |
| submitted_at | DATE | Date the claim was submitted |
| claim_amount | NUMERIC(10,2) | Amount requested for reimbursement |