Consumer Lending Analyst Path · Mission 17 of 30Hard

ARM reset wall (next 6 months)

Multi-table JOIN with date arithmetic on a TEXT date column + NULL filter on a planted defect

The Brief

Tony CostaLoan Servicing Leadconsumer-lending

Pre-emptive outreach list. Pull every ARM whose first reset hits in the next 6 months — `arm_reset_date` between 2026-04-29 and 2026-10-29 inclusive. Six columns: `origination_id`, `customer_name` (concat first + last), `funded_amount`, `interest_rate`, `arm_reset_date`, `days_until_reset` (integer days from today). Sort by `arm_reset_date` ascending, then `origination_id` ascending. Heads up — the data quality team flagged 3 ARM rows with NULL `arm_reset_date`; those slip through your filter and need a separate ticket. Don't include them here.

You'll practice

Date arithmeticBETWEENJOIN

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_applicationsfact18 columns
ColumnTypeKey
app_idINTPK
customer_idINTFK → retail_customers
product_idINTFK → retail_products
application_dateTEXT
requested_amountREAL
requested_termINT
loan_purposeTEXT
action_takenINT
denial_reason_1INT
aus_recommendationTEXT
rate_spreadREAL
lien_statusINT
occupancyINT
ethnicityINT
raceINT
sexINT
age_bucketTEXT
property_tractTEXTFK → lending_geography
retail_customersdim13 columns
ColumnTypeKey
customer_idINTPK
household_idTEXT
first_nameTEXT
last_nameTEXT
date_of_birthTEXT
stateTEXT
segmentTEXT
fico_currentINT
estimated_incomeREAL
kyc_riskTEXT
acquisition_channelTEXT
onboarded_dateTEXT
statusTEXT

Hints (3)

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

Hint 1

Three-table JOIN — originations → applications → customers — to pull the borrower's name alongside the loan facts. Postgres string concatenation is `||`; pair it with a literal space to format the name.

Hint 2

Three filters compose: rate_type = ARM, the date window on arm_reset_date, AND an explicit `arm_reset_date IS NOT NULL`. The IS NOT NULL is doing two jobs — it excludes the planted defect rows the briefing flagged, and it keeps downstream date arithmetic from throwing on NULL inputs.

Hint 3

`arm_reset_date` is stored as TEXT — cast to DATE before the date-window comparison and before the subtraction. Postgres date subtraction returns an integer day count, which is exactly what `days_until_reset` should look like.