Explain it in 60 seconds
NULLs in joins and aggregates
Data Engineering · SQL · Experienced
How do NULLs behave in joins and aggregates, and what bugs can they cause?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- NULL keys never match in equality joins, so those rows drop in inner joins.
- In outer joins, unmatched rows produce NULLs that affect later filters.
- A WHERE on the right table after a LEFT JOIN can turn it into an inner join.
- AVG ignores NULLs, which may not be what the business means.
- Use IS NOT DISTINCT FROM or null-safe equality when NULLs should match.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.