## 12.21 Window Functions

[12.21.1 Window Function Descriptions](window-function-descriptions.html)
[12.21.2 Window Function Concepts and Syntax](window-functions-usage.html)
[12.21.3 Window Function Frame Specification](window-functions-frames.html)
[12.21.4 Named Windows](window-functions-named-windows.html)
[12.21.5 Window Function Restrictions](window-function-restrictions.html)

[]()

 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 `OVER` and `WINDOW` clauses. The first section provides descriptions of the nonaggregate window functions. For descriptions of the aggregate window functions, see [Section 12.20.1, “Aggregate Function Descriptions”](aggregate-functions.html).

 For information about optimization and window functions, see [Section 8.2.1.21, “Window Function Optimization”](window-function-optimization.html).

