hard
Complex SQL JOIN Query
Write a SQL query to aggregate sales data from multiple tables.
📝 Conteúdo do Prompt
Write a SQL query that selects the top 5 customers by total purchase amount in the last year. Assume three tables: 'customers', 'orders', and 'order_items'. You will need to join these tables and use a GROUP BY clause with a SUM aggregation.