Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
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.