Introduction
LEAD() and LAG()
FIRST_VALUE(), LAST_VALUE()
21. Practice 1
Summary

Instruction

All right! It's time for a few exercises. Are you ready?

Exercise

Let's run some cross-website statistics. For every website and every row on May 14, 2016, show the WebsiteId, the Revenue on that day, the highest Revenue from any website on that day (as HighestRevenue) and the lowest revenue from any website on that day (as LowestRevenue).

Stuck? Here's a hint!

You'll need to use both FIRST_VALUE() and LAST_VALUE(). Remember to define the window frame for LAST_VALUE().