Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Simple OVER()
PARTITION BY
Ranking functions
Window Frames
21. Window Frames – Exercise 3
Analytic Functions
PARTITION BY ORDER BY
Order of Evaluation
Finished!

Instruction

Amazing! And the second exercise now.

Exercise

For each subscription, show the following columns: Id, Length, Platform, PaymentDate, and PaymentAmount Also show the future cash flows, calculated as the total money from all subscriptions starting from the PaymentDate of the current row (i.e. include any other payments on the very same date) until the very end. Name the column SumPaymentAmount.

Stuck? Here's a hint!

This time, instead of ROWS, we need RANGE:

RANGE BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING