Filter on a status enum with IN, count rows
Quick number for the morning standup. How many loans are currently 30+ DPD — that's `current_status` IN ('30dpd', '60dpd', '90dpd')? Single scalar, alias `delinquent_count`. Don't include charge-offs — those aren't ours anymore, recovery owns them.
| Column | Type | Key |
|---|---|---|
| origination_id | INT | PK |
| app_id | INT | FK → lending_applications |
| account_id | INT | FK → retail_accounts |
| funded_date | TEXT | |
| funded_amount | REAL | |
| term_months | INT | |
| interest_rate | REAL | |
| rate_type | TEXT | |
| arm_reset_date | TEXT | |
| fico_at_orig | INT | |
| dti_at_orig | REAL | |
| ltv_at_orig | REAL | |
| property_value | REAL | |
| lo_name | TEXT | |
| channel | TEXT | |
| current_status | TEXT | |
| closed_date | TEXT |
Each hint you reveal reduces the XP you can earn. Try the query first.
Single-table count with a WHERE filter on `current_status`. The schema or a quick `SELECT DISTINCT current_status` will tell you what tier values the field uses.
Charge-offs and paid-offs are terminal states — recovery owns charge-offs, paid-offs are off the books. The morning standup tracks loans servicing still owns and can still cure, which is the active-delinquency tiers only.
Single scalar output. `IN` reads cleaner than chained `OR` for a discrete-value match. Alias the count for the report header.