Challenge: Top 3 Customers
Tarea
Swipe to start coding
Write a query to find the top 3 customers by total quantity purchased. Use a window function to rank customers by the sum of their purchased quantities.
- Calculate the total quantity purchased for each customer.
- Rank customers based on their total quantity purchased, with the highest quantity receiving rank 1.
- Select only the top 3 customers according to this ranking.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 4
single
Pregunte a AI
Pregunte a AI
Pregunte lo que quiera o pruebe una de las preguntas sugeridas para comenzar nuestra charla
Suggested prompts:
Can you explain that in simpler terms?
What are the main benefits of this approach?
Are there any common mistakes to avoid with this?
Genial!
Completion tasa mejorada a 5.56
Challenge: Top 3 Customers
Desliza para mostrar el menú
Tarea
Swipe to start coding
Write a query to find the top 3 customers by total quantity purchased. Use a window function to rank customers by the sum of their purchased quantities.
- Calculate the total quantity purchased for each customer.
- Rank customers based on their total quantity purchased, with the highest quantity receiving rank 1.
- Select only the top 3 customers according to this ranking.
Solución
¿Todo estuvo claro?
¡Gracias por tus comentarios!
Sección 4. Capítulo 4
single