Introduction
LEAD() and LAG()
FIRST_VALUE(), LAST_VALUE()
20. LAST_VALUE(x) with different sorting
Summary

Instruction

Great! Let's do one more exercise.

Exercise

For each row where WebsiteId = 1, show the Day, the number of users, the number of users on the last day and the difference between these two values. Name the columns LastUsers and Difference.

Stuck? Here's a hint!

Use LAST_VALUE(Users), but sort by Day.