Challenge: Top Sales per Region
Uppgift
Swipe to start coding
Write a query to find the highest sale amount and corresponding employee for each region using window functions.
- Assign a row number to each sale within its region, ordering by the sale amount in descending order.
- Select the region, employee ID, and sale amount for the row with the highest sale in each region.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. 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 4.55
Challenge: Top Sales per Region
Svep för att visa menyn
Uppgift
Swipe to start coding
Write a query to find the highest sale amount and corresponding employee for each region using window functions.
- Assign a row number to each sale within its region, ordering by the sale amount in descending order.
- Select the region, employee ID, and sale amount for the row with the highest sale in each region.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 4
single