Skip to main content
LAST

Get the last value of a specified field within a range or partition

Updated over 2 weeks ago

Description

The LAST() function returns the last value of a specified field within a range or partition. This is useful for identifying the final entry.

Syntax

LAST(text)

Output

Varies based on input field type

Variables

  1. arg: the field from which to fetch the last value.

Example

LAST(Value) Over (Partition by Group)

ID

Group

Value

LAST

1

A

10

15

2

A

20

15

3

A

15

NULL

4

B

30

40

5

B

40

NULL

Did this answer your question?