Documentation Index
Fetch the complete documentation index at: https://docs.oxla.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
TheMAX() window function is used to compute the maximum value of an expression across a set of rows defined by a window specification.
Syntax
The syntax for this function is as follows:Parameters
ALL: retains all duplicate values from the expression
Example
For the needs of this section, we will use a simplified version of thefilm table from the Pagila database, containing only the title, length and rating columns. The complete schema for the film table can be found on the
Pagila database website.
MAX() to find the maximum length of films for each rating category and also calculate a running maximum length as you move through the films ordered by length. The RunningMaxLength column will be updated as it encounters longer films.