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

Generate Complex SQL Query

#sql #database #query-writing

Write a SQL query to join multiple tables and aggregate data.

Write a PostgreSQL query that lists the top 5 customers by total purchase amount in the last month. Assume tables named 'customers' (id, name) and 'orders' (id, customer_id, amount, date). Join the tables, filter for the last month, group by customer, and order by the total sum descending.