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

SQL Query with Multiple Joins

#sql #database #querying #coding

Construct a SQL query to retrieve data from three related tables.

Write a SQL query to retrieve the full names of all customers and the total amount they have spent. You have three tables: Customers (customer_id, first_name, last_name), Orders (order_id, customer_id), and Order_Items (order_id, amount). Use appropriate joins and aggregate functions.