SQL - Aggregate Functions
You have a table
orders with columns order_id and discount where discount can be NULL. You want to calculate the total discount given, treating NULL as zero, but only for orders with a discount greater than or equal to 0. Which query achieves this?