Cumulative Defaults

Start Timer

0:00:00

Upvote
0
Downvote
Save question
View comments

Let’s say we’re given a loans table and a loan_status table that has one row per loan for each month on book (MOB). MOB 1 is the first month after origination. A loan defaults the first time it hits 90 or more days past due.

Write a query to get the cumulative default rate by MOB for loans originated in January 2026, along with the size of that cohort.

Note: A loan that has defaulted stays defaulted, even if a later row shows it caught up. Round the rate to 4 decimal places.

Example:

Input:

loans table

Column Type
loan_id INTEGER
origination_date DATE
loan_amount INTEGER

loan_status table

Column Type
loan_id INTEGER
mob INTEGER
days_past_due INTEGER

Output:

Column Type
mob INTEGER
cohort_size INTEGER
cumulative_default_rate FLOAT
.
.
.
.
.


Comments

Loading comments