Skip to main content
Version: 24.3.x

Categories: Aggregate

AVG

Computes the average of a set of values.

Syntax

AVG(numeric_expression NUMERIC) → FLOAT

  • numeric_expression: DOUBLE, FLOAT, INTEGER, INTERVAL_DATE, INTERVAL_YEAR

Examples

AVG example
SELECT AVG(3)
-- 3.0
AVG example
SELECT AVG("val")
-- -0.333333