Introduction
Quick refresher
PARTITION BY ORDER BY with ranking
PARTITION BY ORDER BY with window frames
15. Practice 2
PARTITION BY ORDER BY with analytical functions
Revision

Instruction

Excellent. One more!

Exercise

For each sales row, show the following information: store_id, day, revenue and the future cash flow receivable by the headquarters (i.e. the total revenue in that store, counted from the current day until the last day in our table).

Stuck? Here's a hint!

Use ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING.

Console

Code editor

Result

TableConsole