4 ms·
SELECT customer.first_name, customer.last_name, max(order.order_total) as maximum_order FROM customers customer INNER JOIN orders or
by dragonwriter 4y ago
SELECT
customer.first_name,
customer.last_name,
max(order.order_total) as maximum_order
FROM
customers customer
INNER JOIN
orders order
ON (customer.id = order.customer_id)
GROUP BY
customer.id
- zasdffaa 4y agoI don't think subqueries are so bad - at least they're clear, and if fast, that's surely problem solved. IME they are clearer and often faster, so overall better. I know purists don't like them but I do.