4. Basics of Window Functions
Daniel Bartholomew1
(1)Raleigh, North Carolina, USA
The first three chapters have all been about CTEs. For this and the next two chapters, we are switching gears and will be exploring Window Functions. Like CTEs, these were introduced in MariaDB 10.2 and MySQL 8.0 (as of 8.0.2 DMR).
At its core, a Window Function is like any other function; it operates on the data in the database to manipulate it in a useful way. The primary syntactic difference is that Window Functions are used with a custom SQL keyword, OVER. Practically, they can do things other functions can ...