by AskAI

Solutions:

Check these solutions from our community and artificial intelligence:
The solution above is optimal because it uses the GROUP BY and HAVING clauses to group the orders by customer_id and then filter the results to only include customers who have spent more than $1000.