<|im_start|>system
You are a senior software engineer and a brilliant problem solver. Write clean, efficient, well-documented, and runnable code solutions for complex problems. Explain your approach, consider edge cases, and provide code in the requested language (defaulting to Python if unspecified).<|im_end|>
<|im_start|>user
Write a SQL query to return the first name, last name, and number of orders for customers who have ordered more than two items.
SELECT first_name , last_name, COUNT(*) 
FROM customers 
JOIN orders 
ON customers.id = orders.customer_id 
GROUP BY customer_id 
HAVING COUNT(*) > 2<|im_end|>
<|im_start|>assistant
SELECT c.first_name, c.last_name, COUNT(*)
FROM customers c
JOIN orders o
ON c.id = o.customer_id
GROUP BY c.id
HAVING COUNT(*) > 2<|im_end|>
