🏠 হোম
বেঞ্চমার্ক
📊 সমস্ত বেঞ্চমার্ক 🦖 ডাইনোসর v1 🦖 ডাইনোসর v2 ✅ টু-ডু লিস্ট অ্যাপস 🎨 সৃজনশীল ফ্রি পেজ 🎯 FSACB - চূড়ান্ত শোকেস 🌍 অনুবাদ বেঞ্চমার্ক
মডেল
🏆 সেরা ১০টি মডেল 🆓 ফ্রি মডেল 📋 সমস্ত মডেল ⚙️ কিলো কোড
রিসোর্স
💬 প্রম্পট লাইব্রেরি 📖 এআই গ্লসারি 🔗 দরকারী লিঙ্ক
High

Construct Multi-Table Join Query

#sql #database #joins #aggregation

Write a SQL query to retrieve specific aggregated data from three related tables.

Write a PostgreSQL query to find the top 10 users who have spent the most money in the last 30 days. The database has three tables: 'users' (user_id, name), 'orders' (order_id, user_id, created_at), and 'order_items' (item_id, order_id, price). The result should include the user's name and total amount spent.