[]
        
(Showing Draft Content)

FIRSTVALUE

This function returns the value of the argument from the first row of the window frame. It does not require ORDERBY.

Syntax

FIRSTVALUE(value_function)

Arguments

The function provides the following argument.

Argument

Description

value_function

[required] The field name or formula.

Example

// WINDOW(FIRSTVALUE([@sold]), PARTITIONBY([city]),ORDERBY([month]))

city    |  month   |   sold   | first_value
----------------------------------------------
Paris        1          500       500
Paris        2          300       500
Paris        3          400       500
Rome         2          200       200
Rome         3          300       200
Rome         4          500       200