Advanced
Generate a Complex SQL Query
Write a SQL query to join tables and filter specific data points.
📝 プロンプトの内容
You are a SQL expert. Write a query for a PostgreSQL database. You have two tables: 'Orders' (columns: order_id, customer_id, order_date, total_amount) and 'Customers' (columns: customer_id, name, country). Write a query to list the top 5 countries by total revenue generated in the year 2023. Include the country name and the total revenue, ordered by revenue in descending order.