Retail Banking Operations Path · Mission 3 of 30Starter

Open accounts right now

COUNT with IS NULL filter

The Brief

Priya DesaiBranch Operations Managerretail-ops

Weekly retail scorecard for the morning huddle. How many accounts are currently open? `retail_accounts` has a `close_date` that's NULL for any account still on the books. Single number, call the column `open_accounts`.

You'll practice

COUNTIS NULL

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

Hints (3)

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

Hint 1

Accounts still on the books have a specific data pattern in the close column. How does SQL test for the absence of a value — and why can't you use = for this?

Hint 2

Count rows from retail_accounts where close_date is absent — alias the column open_accounts so the scorecard cell binds correctly.

Hint 3

You could also check `status = 'Open'` — in this seed the two are consistent, but `close_date IS NULL` is the more defensive query because it doesn't depend on status being kept up to date.