Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • SELECT first_name,
                        SUM(COALESCE(price, 0)) AS total
    FROM customer
    LEFT JOIN orders ON = orders.customer_id
    LEFT JOIN order_item ON = order_item.order_id
    GROUP BY first_name, last_name, order_date
    HAVING total 15
    ORDER BY order_date ASC

    there, fixed it for you. any math on a NULL needs to have the ability to deal with a non-NULL value. there is a standard SQL function just for this very issue.