🏠 ホーム
ベンチマーク
📊 すべてのベンチマーク 🦖 恐竜 v1 🦖 恐竜 v2 ✅ To-Doリストアプリ 🎨 クリエイティブフリーページ 🎯 FSACB - アルティメットショーケース 🌍 翻訳ベンチマーク
モデル
🏆 トップ10モデル 🆓 無料モデル 📋 すべてのモデル ⚙️ 🛠️ Kilo Code モード
リソース
💬 💬 プロンプトライブラリ 📖 📖 AI用語集 🔗 🔗 有用なリンク
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.