COALESCE
An SQL function that returns its first non-empty value. COALESCE(SUM(amount), 0) gives 0 instead of nothing when an order has no refunds.
An SQL function that returns its first non-empty value. COALESCE(SUM(amount), 0) gives 0 instead of nothing when an order has no refunds.