SQL 92 answer.
Re: List all customers who ordered products where price of the item is $100 greater than average order?
[sql]SELECT c.id, c.firstname, c.lastname
FROM customers c INNER JOIN orders o ON c.customer_id = c.customer_id
WHERE o.price >
(SELECT AVG(o.price) + 100
FROM orders o)[/sql]
|