Layout

Missing customer emails

PROBLEM 2 / 24 · BASICAll problems ↗

Find customers whose email is NULL. Return customer_id and customer_name. Row order does not matter.

Outputcustomer_idcustomer_name

query.sql

DuckDB SQL

Restoring your saved draft…

⌘ / Ctrl + Enter to run

Run a query to see results.

Reveal solution & explanation
SELECT customer_id, customer_name FROM customers WHERE email IS NULL;

SQL uses three-valued logic. IS NULL checks missingness; equality with NULL does not.

Data & schema

customer_id
INTEGER · PK
customer_name
VARCHAR
country
VARCHAR
email
VARCHAR
signup_date
DATE
Table notes & relationships

Buyer accounts. Some buyers have no orders, and some email addresses are NULL.

Fictional teaching data. Money is USD cents; timestamps are UTC.