medium10 pts · first answer countssqlnull-handling
NOT IN with a NULL in the list
customers has ids 1, 2, 3. blocked.customer_id has the values 2 and NULL. What does this query return?
SELECT COUNT(*) FROM customers WHERE id NOT IN (SELECT customer_id FROM blocked);
Discussion 0
Join free to post in the discussion.
Related questions
- Purpose of a primary keyData Engineer
- Row count of a LEFT JOINData Engineer
- Filtering with = NULLData Engineer
- COUNT(*) vs COUNT(column)Data Engineer
- Filtering groups with HAVINGData Engineer
- Adding a number to NULLData Engineer
- Orders pointing to missing customersData Engineer
- avg and count with a null valueData Engineer