ARRAY_PRODUCT()
All functions > ARRAY > ARRAY_PRODUCT()
Returns the product of all numeric elements in an array as a DOUBLE.
Signatures
Returns: Product of non-NULL elements, or NULL when undefined
ARRAY_PRODUCT(array: ARRAY<T>) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
array | ARRAY<T> | Yes | Numeric array |
Notes
- Ignores NULL elements
- Returns NULL for an empty array or an array of only NULLs
- Result type is DOUBLE
See also
Examples
FeatureQL
SELECT
f1 := ARRAY_PRODUCT(ARRAY[2, 3, 4]) -- Product of integers
;Result
| f1 VARCHAR |
|---|
| 24.0 |
On this page