🏠 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
Intermediate

Write SQL Sales Aggregation

#sql #database #data-analysis

Construct a SQL query to calculate total sales per region.

Write a SQL query for a table named 'sales' which has columns 'id', 'product_name', 'region', 'amount', and 'sale_date'. The query should calculate the total sales amount for each region. Only include sales that occurred in the current year. Order the results by the total sales amount in descending order.