[]
This function returns the value of the argument from the first row of the window frame. It does not require ORDERBY.
FIRSTVALUE(value_function)
The function provides the following argument.
Argument | Description |
---|---|
value_function | [required] The field name or formula. |
// 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