The first non-NULL argument supplies the result.

highlighted = computed this step

First non-NULL argument wins

COALESCE checks arguments from left to right.

left to right\text{left to right}

Read first-argument wins

The first argument supplies the result for 1 row.

first argument rows=1\text{first argument rows}=1

COALESCE examples are tiny finite row transforms with SQL-style NULL choice behavior; SQL dialect completeness, type coercion, optimizer behavior, indexing, and product claims are out of scope.

First non-NULL argument wins: base rowsnameemailbackupnicknameAdaada@exampleada@backupNULLBeaNULLbea@backupBCalNULLNULLCalDeeNULLNULLNULL COALESCE argument choicesourcearg valueschosenIndexresultresultSource0[ada@example, ada@backup, missing]0ada@exampleemail1[NULL, bea@backup, missing]1bea@backupbackup2[NULL, NULL, missing]2missingliteral3[NULL, NULL, missing]2missingliteral COALESCE output rowsnameemailbackupnicknamecontactAdaada@exampleada@backupNULLada@exampleBeaNULLbea@backupBbea@backupCalNULLNULLCalmissingDeeNULLNULLNULLmissing COALESCE factsfactvalueinputRowCount4argCount3outputRowCount4firstArgRows1fallbackRows3literalDefaultRows2allNullRows0rowOrdersource_orderwhereContrastvalue_choice_not_truth_filter

Stop at the first value

When email is present, backup and the literal default are not used for that row.

stop at first value\text{stop at first value}

Summary

COALESCE is ordered: the first non-NULL value wins.

first non-NULL wins\text{first non-NULL wins}