🏠 Home
Benchmark
📊 Tutti i benchmark 🦖 Dinosauro v1 🦖 Dinosauro v2 ✅ App To-Do List 🎨 Pagine libere creative 🎯 FSACB - Ultimate Showcase 🌍 Benchmark traduzione
Modelli
🏆 Top 10 modelli 🆓 Modelli gratuiti 📋 Tutti i modelli ⚙️ Kilo Code
Risorse
💬 Libreria di prompt 📖 Glossario IA 🔗 Link utili
Medium

Write a Complex SQL Query

#sql #database #code

Construct a SQL query involving joins and aggregation.

Write a PostgreSQL query to find the top 5 users who have spent the most money in the last 30 days. Assume two tables: 'users' (id, username) and 'orders' (user_id, amount, created_at). The query should return the username and the total amount spent.