Your question is Flag Sudden Credit Utilization Shifts. Start with the requirements and the one table 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.
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 |