Pre-General Availability Draft: 2017-10-17
MySQL supports window functions that, for each row from a query,
perform a calculation using rows related to that row. The
following sections discuss how to use window functions, including
descriptions of the
WINDOW clauses. The first section provides
descriptions of the nonaggregate window functions. For
descriptions of the aggregate window functions, see
Section 12.18.1, “Aggregate (GROUP BY) Function Descriptions”.
For information about optimization and window functions, see Section 126.96.36.199, “Window Function Optimization”.