Issue #24224:normalize margin calculations

If the inner select returns a multiset of `null`s then the `sum` will be `null`. The `coalesce` ensures that `_tax` has a strictly numeric value.