Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
LEAD and LAG
FIRST_VALUE, LAST_VALUE, NTH_VALUE
22. Practice 1
Summary

Instruction

Alright, it's time for a few exercises. Are you ready?

Exercise

Let's run some cross-website statistics now. Take the day May 14, 2016 and for each row, show: website_id, revenue on that day, the highest revenue from any website on that day (AS highest_revenue and the lowest revenue from any website on that day (as lowest_revenue).

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.