Retail Banking Operations Path · Mission 11 of 30Medium

Deposit beta on MMAs (cycle-to-date)

ADB-weighted rate average across a date window

The Brief

Jordan KimTreasurerretail-ops

ALCO is meeting Friday. The Fed cut 50bp from the September peak to early November 2025 — I want our balance-weighted MMA deposit rate by month for Sep, Oct, and Nov 2025 so I can compute cumulative deposit beta. Pull from `retail_balance_daily` joined to `retail_accounts` and `retail_products`, MMA subcategory only. Three columns: `month` (the month number 9, 10, 11 as an integer), `weighted_avg_rate` (the ADB-weighted average of `interest_rate`, rounded to 6 decimals), and `avg_balance` (rounded to 2 decimals). Sort by month ascending.

You'll practice

WindowWeighted by ADB

Tables & columns available

retail_balance_dailyfact8 columns
ColumnTypeKey
snapshot_idINTPK
account_idINTFK → retail_accounts
snapshot_dateTEXT
ledger_balanceREAL
available_balanceREAL
interest_rateREAL
days_overdrawnINT
delinquency_statusTEXT
retail_accountsdim13 columns
ColumnTypeKey
account_idINTPK
customer_idINTFK → retail_customers
product_idINTFK → retail_products
branch_idINTFK → retail_branches
open_dateTEXT
close_dateTEXT
statusTEXT
ownership_typeTEXT
interest_rateREAL
original_balanceREAL
credit_limitREAL
fico_at_origINT
maturity_dateTEXT
retail_productsdim10 columns
ColumnTypeKey
product_idINTPK
product_codeTEXT
product_nameTEXT
categoryTEXT
subcategoryTEXT
default_aprREAL
default_apyREAL
monthly_feeREAL
nsf_feeREAL
od_feeREAL

Hints (3)

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

Hint 1

ADB-weighted rate isn't the same as a simple AVG. The formula is `SUM(rate * balance) / SUM(balance)` — bigger accounts pull the weighted-mean rate toward whatever they're earning.

Hint 2

Filter to MMA subcategory and the September–November 2025 window in WHERE. Use `EXTRACT(MONTH FROM snapshot_date::date)` to bucket by month — cast the TEXT date column first to avoid a type error.

Hint 3

Group on the month integer. Use the SUM-of-product-over-SUM pattern for the weighted rate (NULLIF the denominator so a zero-balance month doesn't divide-by-zero). Round to 6 decimals so basis-point shifts are visible. The third column is a plain AVG of the balance.