Skip to content
SDETRole
SDETRole

Customers who never ordered

intermediate NULL handling Challenge 5 of 13

Marketing wants to email registered customers who have never placed an order. The query in the editor is a reasonable first attempt, but it returns no rows.

Requirements

  • Return id and name of customers with no rows in orders.
  • The result must stay correct when orders.customer_id contains NULLs (guest checkouts).
  • Order by id.

Expected output

id | name 5 | Ella Novak 8 | Hugo Brown 10 | Jack Kim 12 | Liam Fox

Checks (3)

  • ○Sample data
  • ○Ella places her first order
  • ○A new customer signs up

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

SQLite

Loading the database…

“null” marks columns that allow NULL. Foreign keys are not enforced, as in many real test databases.

Type to search across SDETRole.

Full-text search by Pagefind · runs in your browser Open search page →