Alright! It's time to review what we've learned in this part:
- You can define a window frame within
OVER(...). The syntax is:
[ROWS|RANGE] <window frame definition>.
ROWS always treats rows individually (like the
RANGE also adds rows which share the same value in the column we order by (like the
<window frame definition> is defined with
BETWEEN <lower bound> AND <upper bound>, where the bounds may be defined with:
n PRECEDING (
n FOLLOWING (
So, are you ready for a short quiz?