🏠 الرئيسية
المقاييس
📊 جميع المقاييس 🦖 ديناصور v1 🦖 ديناصور v2 ✅ تطبيقات قائمة المهام 🎨 صفحات حرة إبداعية 🎯 FSACB - العرض النهائي 🌍 مقياس الترجمة
النماذج
🏆 أفضل 10 نماذج 🆓 نماذج مجانية 📋 جميع النماذج ⚙️ كيلو كود
الموارد
💬 مكتبة الأوامر 📖 قاموس الذكاء الاصطناعي 🔗 روابط مفيدة
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.