LISTING 1: Using Two Subqueries in a SET Clause
UPDATE CUSTOMER
SET cust_oqty = cust_oqty + (SELECT COUNT(*) FROM ORDER WHERE order_cust_id = cust_id),
cust_lastod = (SELECT MAX(order_date) FROM ORDER WHERE order_cust_id = cust_id)
FROM ORDER
JOIN CUSTOMER
ON cust_id = order_cust_id
ORDER BY order_date