SUM skips NULL and adds present integers.

highlighted = computed this step

SUM skips NULL

SUM adds present integer cells and skips NULL cells.

SUM skips NULL\text{SUM skips NULL}

Read the sum

The recomputed sum is 7 after skipping 4 NULL cells.

SUM=7\text{SUM}=7

Aggregate NULL examples are tiny finite table transforms; SQL dialect completeness, optimizer behavior, indexing, product behavior, and performance claims are out of scope.

SUM skips NULL: base rowsidregionqtynote1east2ok2eastNULLmissing3west5ok4westNULLNULL5northNULLmissing6northNULLNULL Group bucketskeysourceRowsrowCount[all_rows][0, 1, 2, 3, 4, 5]6 Aggregate resultskeysourceRowsaggregates[all_rows][0, 1, 2, 3, 4, 5]{qty_sum:7} NULL-skip detailskeyaggregateseencounted/addednullSkippedresult[all_rows]qty_sum6247 Output rowsqty_sum7 Aggregate NULL factsfactvalueinputRowCount6groupCount1aggregateCount1outputRowCount1countStarCountsEveryRowyescountColumnSkipsNullyessumSkipsNullyesallNullSumGivesNULLgroupOrderfirst_seen_input_orderoutputOrderdeterministic_group_order

Only integers add

The engine rejects a non-NULL string in a SUM column.

integer cells only\text{integer cells only}

Summary

NULL cells are skipped; present integer cells are added.

skip then add\text{skip then add}