ARRAY_STDDEV_SAMP()
All functions > ARRAY > ARRAY_STDDEV_SAMP()
Returns the sample standard deviation (divide by N-1) of numeric array elements as a DOUBLE.
Signatures
Returns: Sample standard deviation
ARRAY_STDDEV_SAMP(array: ARRAY<T>) → DOUBLE sql
| Parameter | Type | Required | Description |
|---|---|---|---|
array | ARRAY<T> | Yes | Numeric array |
Notes
- Ignores NULL elements
- Returns NULL when fewer than two non-NULL values are present
See also
Examples
FeatureQL
SELECT
f1 := ROUND(ARRAY_STDDEV_SAMP(ARRAY[2, 4, 4, 4, 5, 5, 7, 9]), 3) -- Sample stddev
;Result
| f1 VARCHAR |
|---|
| 2.138 |
On this page