Your question is SQL Retention for Repeat Borrowers. Start with the requirements and the two tables 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.
Write a SQL query to find the monthly retention rate of borrowers who have taken out multiple loans with Upstart.
Use funded loans only. A borrower is retained for a month if they have another funded loan in the immediately following calendar month. Include only borrowers with at least two funded loans overall.
month_start, retained_borrowers, eligible_borrowers, and retention_rateretention_rate as a percentage rounded to two decimal placesmonth_start ascending| Column | Type | Description |
|---|---|---|
| borrower_idPK | INT | Unique Upstart borrower identifier |
| borrower_name | VARCHAR(100) | Borrower display name |
| VARCHAR(255) | Borrower email address |
| Column | Type | Description |
|---|---|---|
| loan_idPK | INT | Unique loan identifier |
| borrower_id | INT | References borrowers.borrower_id |
| status | VARCHAR(20) | Loan lifecycle status |
| funded_at | DATE | Date the loan was funded |
| loan_amount | DECIMAL(12,2) | Original funded loan amount |