© Daniel Bartholomew 2017
Daniel BartholomewMariaDB and MySQL Common Table Expressions and Window Functions Revealedhttps://doi.org/10.1007/978-1-4842-3120-3_4

4. Basics of Window Functions

Daniel Bartholomew
(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 ...

Get MariaDB and MySQL Common Table Expressions and Window Functions Revealed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.