Retail Banking Operations Path · Mission 17 of 30Hard

Branch consolidation candidate score

Multi-criteria ranking with regulatory exclusion

The Brief

Marcus ChenRetail Banking COOretail-ops

Strategy team is sizing the 2026 branch footprint. I want a shortlist of 5 consolidation candidates. Two constraints: (1) the branch must NOT be in an LMI tract (closing those triggers a CRA review), (2) rank by lowest average daily foot_traffic across the 90-day activity window. Pull from `retail_branches` LEFT JOIN to `retailops_branch_activity`. Output `branch_id`, `branch_name`, `region`, `avg_foot_traffic` (rounded to 1 decimal), `avg_deposits` (rounded to 1 decimal). Sort foot_traffic ascending, limit 5.

You'll practice

Multi-criteria ranking

Tables & columns available

retail_branchesdim8 columns
ColumnTypeKey
branch_idINTPK
branch_nameTEXT
regionTEXT
stateTEXT
lmi_tract_flagINT
open_dateTEXT
close_dateTEXT
branch_typeTEXT
retailops_branch_activityfact7 columns
ColumnTypeKey
activity_idINTPK
branch_idINTFK → retail_branches
activity_dateTEXT
teller_countINT
account_openingsINT
foot_trafficINT
deposits_taken_countINT

Hints (3)

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

Hint 1

`avg_foot_traffic` is an aggregate — you'll need to GROUP BY the branch fields and AVG the activity columns. LEFT JOIN guards against branches that have zero activity rows from being silently dropped.

Hint 2

The LMI exclusion lives in WHERE on `retail_branches.lmi_tract_flag = 0`. Putting it on the branches side (not the activity side) is what makes the LEFT JOIN behave correctly.

Hint 3

GROUP BY the branch fields, ORDER BY the AVG ascending so the lowest-traffic branches surface first, then LIMIT to the shortlist size in the briefing. Round both AVG outputs to 1 decimal.