Given a large table of loan applications, write a query to flag accounts that show sudden shifts in credit utilization.
Treat consecutive applications for the same account as comparison points. A sudden shift is an absolute change of at least 20 percentage points. Ignore comparisons where either utilization value cannot be calculated.
account_id, application_date, previous_utilization_pct, utilization_pct, and utilization_change_pct_pointsaccount_id, then application_date| Column | Type | Description |
|---|---|---|
| application_idPK | INT | Unique loan application identifier |
| account_id | VARCHAR(20) | Account associated with the application |
| application_date | DATE | Date the application was recorded |
| credit_limit | NUMERIC(12,2) | Credit limit available to the account |
| outstanding_balance | NUMERIC(12,2) | Outstanding balance at application time |