Customers with no city on file
beginner NULL handling Challenge 1 of 13
The support team wants to contact active customers whose city is missing so they can complete their profiles. The query in the editor runs but returns no rows. Fix it.
Requirements
- Return
idandnameof customers whosestatusis'active'and whosecityis missing (NULL). - Order the result by
id.
Expected output
id | name 4 | Dev Sharma 10 | Jack Kim
Checks (3)
- ○Sample data
- ○A new active customer without a city
- ○An inactive customer without a city is excluded
Each check builds a fresh database and compares your result with the reference solution's: same number of columns in the same order (names are not checked), and the same rows in the same order.
query.sqlExecutes on SQLite in your browser
Ctrl/⌘ + Enter to check query · your code is saved in this browser
Results
Use Run query to see your rows, then Check query to grade it.
Schema · Acme Store
SQLiteLoading the database…
“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.