🏠 Главная
Бенчмарки
📊 Все бенчмарки 🦖 Динозавр v1 🦖 Динозавр v2 ✅ Приложения To-Do List 🎨 Творческие свободные страницы 🎯 FSACB - Ультимативный показ 🌍 Бенчмарк перевода
Модели
🏆 Топ-10 моделей 🆓 Бесплатные модели 📋 Все модели ⚙️ Режимы Kilo Code
Ресурсы
💬 Библиотека промптов 📖 Глоссарий ИИ 🔗 Полезные ссылки
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.