Skip to main content
Returns the average value within the requested window. For more information on usage, please refer to Window Functions.

Syntax

Parameters

Return Types

  • NUMERIC if the input is type INTEGER, BIGINT or NUMERIC
  • DOUBLE PRECISION if the input is type REAL or DOUBLE PRECISION

Example

The example below shows each player’s score alongside the average score for their level. Unlike a regular AVG() aggregation, the window function keeps one row per player while also computing the per-level average.

Rows: 5Execution time: 2.78ms