Aggregation After Joins and NULL Handling/Expect NULLs on the optional side of outer joins

Missing matches appear as NULL-valued columns.

Section: NULL behavior

Expect NULLs on the optional side of outer joins

text
text
LEFT JOIN → right-side columns may be NULL
RIGHT JOIN → left-side columns may be NULL
FULL OUTER JOIN → either side may be NULL
Explanation

This is normal and often what makes outer joins useful.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing NULL behavior
Use COALESCE for outer-join aggregates
Replace `NULL` with a friendlier value in results.
OpenIn sheetsql1 tag match
Use COUNT(DISTINCT ...) when joins multiply rows
Protect aggregates from one-to-many duplication.
Pre-aggregate before joining
Summarize large fact tables first, then join the result.