Consumer Lending Analyst Path · Mission 7 of 30Easy

Avg funded amount by loan purpose

AVG aggregation with GROUP BY across a JOIN of fact and application tables

The Brief

Jennifer WhitmanMortgage Sales Directorconsumer-lending

Refreshing the LO comp grid this morning. Pull the average funded amount per `loan_purpose` from the funded book — that's `lending_originations` joined to `lending_applications`. Two columns: `loan_purpose`, `avg_funded` (rounded to 2 decimals). Sort by avg_funded descending so the highest-ticket purposes lead.

You'll practice

AVGGROUP BY

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

Hints (3)

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

Hint 1

Purpose lives on `lending_applications`; funded amount lives on `lending_originations`. JOIN on the link key that uniquely ties one origination to one application — joining on the wrong key fans the rows out and inflates every average.

Hint 2

AVG with rounding so the column reads as a dollar amount in the deck. Group by the purpose dimension.

Hint 3

Two-column projection. Sort highest average first so the high-ticket purposes lead the LO comp grid.