Upsolver SQLake
Contact Support
Search
⌃
K
Links
Overview
Get started
Deploying Upsolver on AWS
Connectors
Data ingestion
Data transformation
Quickstarts
How to guides
SQL command reference
Functions and operators reference
Logical operators and filter functions
Comparison functions and operators
Conditional functions and expressions
Mathematical functions and operators
String functions and operators
Regular expression functions
Date and time functions
Interval functions
Aggregate functions
APPROX_COUNT_DISTINCT
APPROX_COUNT_DISTINCT_EACH
AVG
AVG_EACH
AVG_TIME_SERIES
COLLECT_SET
COLLECT_SET_EACH
COUNT
COUNT(*)
COUNT(DISTINCT ...)
COUNT_EACH
COUNT_IF
DYNAMIC_SESSIONS
FIRST
FIRST_ARRAY
FIRST_EACH
FIRST_TIME_SERIES
LAST
LAST_ARRAY
LAST_EACH
LAST_K
LAST_K_EACH
LAST_TIME_SERIES
MAX
MAX_BY
MAX_EACH
MAX_TIME_SERIES
MIN
MIN_BY
MIN_EACH
MIN_TIME_SERIES
SESSION_COUNT
STD_DEV
STD_DEV_EACH
STRING_MAX
STRING_MAX_EACH
STRING_MIN_EACH
SUM
SUM_EACH
SUM_TIME_SERIES
WEIGHTED_AVERAGE
Array functions
URL functions
External APIs functions
Spatial functions
Structural functions
Type conversions functions
System Catalog
Job status
API Integration
CLI
FAQ
Troubleshooting
Upsolver cost estimate
Change log
Powered By
GitBook
Comment on page
LAST_K
Gets the last
k
values per group.
Syntax
LAST_K
([
K
],
VALUE
)
Arguments
K
Type:
integer
Default: 1
(Optional) The number of values to return.
VALUE
Type: any
The field to get the last value(s) of.
Returns
Type:
array
Returns an array of the last
K
values of
VALUE
seen for each group.
Previous
LAST_EACH
Next
LAST_K_EACH
Last modified
2mo ago