NORMALIZE
All functions > ARRAY > NORMALIZE
Normalizes a numeric array by dividing each element by the sum of all elements.
Syntax
NORMALIZE(array) sql
Arguments
| Parameter | Type | Required | Description |
|---|---|---|---|
array | ARRAYTINYINT | Yes | Array of numeric values to normalize |
Returns
ARRAY(DOUBLE) - Normalized array where elements sum to 1
Notes
- Divides each element by sum of all elements
- Result sums to 1.0 (probability distribution)
- Useful for creating probability vectors
- Returns array of doubles