Consumer Lending Analyst Path · Mission 15 of 30Medium

Late-payment rate by vintage month

DATE_TRUNC for vintage cohorts + conditional ratio across a JOIN

The Brief

Tony CostaLoan Servicing Leadconsumer-lending

Servicing trend deck for the monthly review. Compute late-payment rate per origination cohort month — that's funded loans grouped by their `funded_date` month, then the share of payments where `status = 'late'`. Four columns: `vintage_month` ('YYYY-MM' format), `total_payments`, `late_payments`, `late_rate` (4 decimals). Skip the vintage 2019 ARM cohort — they're a separate book, filter `funded_date >= '2024-11-01'`. Sort by vintage_month ascending.

You'll practice

DATE_TRUNCConditional ratio

Tables & columns available

lending_originationsfact17 columns
ColumnTypeKey
origination_idINTPK
app_idINTFK → lending_applications
account_idINTFK → retail_accounts
funded_dateTEXT
funded_amountREAL
term_monthsINT
interest_rateREAL
rate_typeTEXT
arm_reset_dateTEXT
fico_at_origINT
dti_at_origREAL
ltv_at_origREAL
property_valueREAL
lo_nameTEXT
channelTEXT
current_statusTEXT
closed_dateTEXT
lending_paymentsfact10 columns
ColumnTypeKey
payment_idINTPK
origination_idINTFK → lending_originations
due_dateTEXT
paid_dateTEXT
scheduled_amountREAL
principal_paidREAL
interest_paidREAL
escrow_paidREAL
days_lateINT
statusTEXT

Hints (3)

Each hint you reveal reduces the XP you can earn. Try the query first.

Hint 1

Two-table JOIN: originations for the funded_date / vintage, payments for the per-payment status. Filter the originations side to the main-band cohort before the JOIN so the 2019 ARM book doesn't dominate denominators.

Hint 2

For monthly buckets, reach for `DATE_TRUNC` to pin the bucket key to a first-of-month value. To render the 'YYYY-MM' label format, layer `TO_CHAR` on top — compose the two functions, don't try to substring the date.

Hint 3

Conditional ratio — same shape as M6 — with the late-status predicate as the numerator condition. Round to 4 decimals. The bucket expression you projected must match the GROUP BY exactly.