Arithmetic with NULL yields NULL, so a missing adjustment does not silently become zero.

highlighted = computed this step

Input table

Start with charge rows where one adjustment is NULL.

Charge adjustments\text{Charge adjustments}
Charge adjustmentsorder_idamountadjustmento110010o280NULLo3505

Select query

Subtract adjustment from amount and name the result adjusted_amount.

amount minus adjustment AS adjusted_amount\text{amount minus adjustment AS adjusted\_amount}
SELECT adjusted amountselect order_id,adjusted_amountarity 2 rows 3ChargeAdjustmentsarity 3 rows 3

Output table

The missing adjustment produces NULL instead of being treated as zero.

NULL-preserving arithmetic\text{NULL-preserving arithmetic}
Outputorder_idadjusted_amounto190o2NULLo345