Challenge: Top Sales per Region
Opgave
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 alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 4
single
Spørg AI
Spørg AI
Spørg om hvad som helst eller prøv et af de foreslåede spørgsmål for at starte vores chat
Suggested prompts:
Can you explain this in simpler terms?
What are some examples related to this topic?
Where can I learn more about this?
Fantastisk!
Completion rate forbedret til 4.55
Challenge: Top Sales per Region
Stryg for at vise menuen
Opgave
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 alt klart?
Tak for dine kommentarer!
Sektion 1. Kapitel 4
single