Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quick refresher
PARTITION BY ORDER BY with ranking
11. Practice 2
PARTITION BY ORDER BY with window frames
PARTITION BY ORDER BY with analytical functions
Summary

Instruction

Perfect! Another one of the way.

Exercise

For each day of the sales statistics, show the day, the store_id of the best store in terms of the revenue on that day, and that revenue.

Stuck? Here's a hint!

Remember to use temporary table.

Use

RANK() OVER(PARTITION BY day ORDER BY revenue DESC)