American Credit Acceptance wants to monitor delinquency patterns across its auto loan portfolio. Using posted payment transactions from 2025, write a PostgreSQL query to identify the top-decile risk segment, where a segment is defined by borrower state and risk tier.
LATE and CHARGED_OFF as delinquent.| Column | Type | Description |
|---|---|---|
| loan_idPK | INTEGER | Unique auto loan identifier |
| state | VARCHAR(2) | Borrower state |
| risk_tier | VARCHAR(30) | Underwriting risk classification |
| Column | Type | Description |
|---|---|---|
| transaction_idPK | INTEGER | Unique payment transaction identifier |
| loan_id | INTEGER | Loan associated with the payment transaction |
| transaction_date | DATE | Date the payment transaction was posted |
| status | VARCHAR(20) | Payment outcome status |