Loyalty wants to reward the biggest spender in every product category:
purchases (
purchase_id INTEGER PRIMARY KEY,
customer_id INTEGER,
category TEXT,
amount INTEGER
)
Write a SQL query that returns, per category, the customer(s) with the highest
total spend in that category. If multiple customers tie for the top spot,
return all of them.
Return columns: category, customer_id, total_spent.
Order by category ASC, then customer_id ASC.