Array functions
This page goes over the array functions in Upsolver.
Last updated
This page goes over the array functions in Upsolver.
Last updated
ARRAY_JOIN
Concatenates all values into a single string, separated by the separator.
ARRAY_JOIN(SEPARATOR, VALUES)
ARRAY_MAX
Return the maximum value in an array.
ARRAY_MIN
Return the minimum value in an array.
ARRAY_SUM
Sums all the values in the array.
CONCAT
Returns an error message indicating that CONCAT has been deprecated.
COUNT_VALUES
Returns the amount of items in a given array.
COUNT_VALUES_IF
Returns the amount of true
values in a given array.
DISTINCT_VALUES
Get all the distinct elements in the array.
ELEMENT_AT
Gets the element at the given index in the array.
Index - The index of the item to return
FIRST_ELEMENT
Gets the first element in the array.
LAST_ELEMENT
Gets the last element in the array.
LEAST
Return the minimum value.
This function returns the concatenation of the arguments. It provides the same functionality as the SQL-standard concatenation operator (||).
PRESTO_CONCAT(STRING1, STRING2, ..., STRINGN)
STRING#
An expression to concatenate.
The concatenation of the arguments.
Values
"a"
, "b"
, "c"
5.5
"a"
, "b"
, "c"
inputs
result
1
, 0.2
, 30
30
inputs
result
1
, 0.2
, 30
0.2
inputs
result
1
, 0.2
, 30
31.2
input
result
0
"a"
, "b"
, "c"
3
input
result
0
true
, false
, true
2
input
result
1
, 2
, 3
, 4
, 4
, 1
1
, 2
, 3
, 4
input
Index
result
"a"
, "b"
, "c"
1
"b"
"a"
1
null
"a"
, "b"
, "c"
-1
null
input
result
null
"a"
, "b"
, "c"
"a"
input
result
null
"a"
, "b"
, "c"
"c"
input
result
[1, 0.2]
, [30]
0.2
Strings
Result
"a"
, "b"
, "c"
"abc"
"1", "2" , "A", "B"
"12AB"