VECTOR_AVG

functionsupportedAI & ML

docs.snowflake.com ↗

Vector functionsAggregate functions

Computes the element-wise average of vectors in an aggregate. Returns a vector where each element is the average of the corresponding elements across all input vectors. The output is always VECTOR(FLOAT, N) regardless of input type.

Syntax

VECTOR_AVG( <vector_column> )

Parameters

NameRequiredDescription
vector_columnrequiredA column containing VECTOR values. All vectors in the column must have the same element type and dimension.

Returns

Returns a VECTOR(FLOAT, N) value where N is the dimension of the input vectors. Each element in the result vector is the average of the corresponding elements across all input vectors.

Usage notes

See also

Referenced by