Retail Banking Operations Path · Mission 5 of 30Starter

Net new checking accounts this week

WHERE with date filter + set arithmetic across two events

The Brief

Marcus ChenRetail Banking COOretail-ops

Weekly retail dashboard. Net new checking = openings minus closures of `Checking` accounts during the trailing 7 days (use `2025-11-24` through `2025-11-30` inclusive). Single number, alias it `net_new_checking`. Pull from `retail_accounts` joined to `retail_products` for the subcategory filter.

You'll practice

WHEREDate filterSet arithmetic

Tables & columns available

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

Two events sit in the same table: an opening (`open_date` falls in the window) and a closure (`close_date` falls in the window). One number is the difference between the two counts.

Hint 2

Conditional aggregation handles both legs in one SELECT — SUM a CASE that returns +1 for openings and -1 for closures, both gated on the date window and the Checking subcategory.

Hint 3

Don't filter on close_date IS NULL — closures during the window have a non-null close_date that you specifically want to count (negatively).