intermediate
SQL Query Generator
Generate a SQL query based on a natural language description of data requirements.
📝 Contenu du Prompt
Write a SQL query for a PostgreSQL database. The database has a table named 'orders' with columns 'order_id', 'customer_id', 'order_date', and 'total_amount'. Write a query to find the top 5 customers by total spending in the last month.