average_y() calculates
the average for all the values of the y variable, independent of the values of the x variable.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Calculate the average from a two-dimensional statistical aggregate for the dimension specified
average_y() calculates
the average for all the values of the y variable, independent of the values of the x variable.
SELECT average_x(stats_agg(y, x))
FROM generate_series(1, 5) y,
generate_series(0, 100) x;
average
-----------
50
average_y(
summary StatsSummary2D
) RETURNS DOUBLE PRECISION
average_x(
summary StatsSummary2D
) RETURNS DOUBLE PRECISION
| Name | Type | Default | Required | Description |
|---|---|---|---|---|
| summary | StatsSummary2D | - | ✔ | The statistical aggregate produced by a stats_agg call |
| Column | Type | Description |
|---|---|---|
| average_y | average_x | DOUBLE PRECISION | The average of the values in the statistical aggregate |