Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
ROWS
RANGE
Default window frame
Summary
21. Summary

Instruction

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 ROW_NUMBER() function), RANGE also adds rows which share the same value in the column we order by (like the RANK() function).
  • <window frame definition> is defined with BETWEEN <lower bound> AND <upper bound>, where the bounds may be defined with:
    • UNBOUNDED PRECEDING,
    • n PRECEDING (ROWS only),
    • CURRENT ROW,
    • n FOLLOWING (ROWS only),
    • UNBOUNDED FOLLOWING

So, are you ready for a short quiz?

Exercise

Click Next exercise to continue.