🏠 Hem
Benchmarkar
📊 Alla benchmarkar 🦖 Dinosaur v1 🦖 Dinosaur v2 ✅ To-Do List-applikationer 🎨 Kreativa fria sidor 🎯 FSACB - Ultimata uppvisningen 🌍 Översättningsbenchmark
Modeller
🏆 Topp 10 modeller 🆓 Gratis modeller 📋 Alla modeller ⚙️ Kilo Code
Resurser
💬 Promptbibliotek 📖 AI-ordlista 🔗 Användbara länkar
intermediate

High-Value Customer SQL Query

#sql #database #analytics

Generate a SQL query to identify top customers based on spending.

Construct a PostgreSQL query to select the top 10 users with the highest total purchase amount from the 'orders' table. The output should include user_id, user_name, and the sum of their total_orders, sorted by the total amount in descending order.