Challenge: Top 3 Customers
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 4. Kapitel 4
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 5.56
Challenge: Top 3 Customers
Svep för att visa menyn
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 4. Kapitel 4
single