LAST_N

Returns the last N element of an array.

Format

LAST_N (A,N)

Arguments

 
A
An array.
N
Number of elements to return.

Examples

The following examples illustrate the use of the LAST function:
 
Function
LAST_N({3},2)
Result
{}
 
Function
LAST_N({1,2,3},0)
Result
{}
 
Function
LAST_N({1,2,3},2)
Result
{2,3}