About this problem
You practise testing for a missing value. The data team wants every customer in customers with no phone recorded, returned as customer_id. It is the most basic NULL question there is, and it checks whether you know that SQL needs a dedicated predicate for missing data rather than an ordinary comparison. The sample mixes customers who have full international numbers with customers whose phone cell is empty, which is exactly the split you need to make.
The natural first attempt is WHERE phone = NULL. It runs without an error and returns nothing, which can look like “no customers are missing a phone”. The reason is that any comparison with NULL evaluates to unknown rather than true, and WHERE keeps only rows where the condition is true. phone <> NULL fails the same way, as does NOT (phone = NULL). Watch the same behaviour if you sanity-check your answer with counts: COUNT(phone) skips missing values, so comparing it with COUNT(*) tells you how many gaps to expect. If a query returns zero rows on a table where you can see empty cells, suspect the comparison before you suspect the data.
Read the lesson: NULL & Unknown (P02) →