🏠 Home
Benchmark Hub
📊 All Benchmarks 🦖 Dinosaur v1 🦖 Dinosaur v2 ✅ To-Do List Applications 🎨 Creative Free Pages 🎯 FSACB - Ultimate Showcase 🌍 Translation Benchmark
Models
🏆 Top 10 Models 🆓 Free Models 📋 All Models ⚙️ Kilo Code
Resources
💬 Prompts Library 📖 AI Glossary 🔗 Useful Links
Advanced

Generate a Complex SQL Query

#sql #database #data-analysis

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.