Skip to content
ClickHouse Docs

regr_syy

Autogenerated from ClickHouse system tables

Introduced in: v26.9.0

Returns the sum of squares of the dependent variable:

Σ(y−yˉ)2\Sigma{(y - \bar{y})^2}

Syntax

regr_syy(y, x)

Arguments

Returned value

Returns the sum of squares of y around its mean. Float64

Examples

Basic usage

SELECT regr_syy(y, x)
FROM VALUES('x Float64, y Float64', (1, 2), (2, 4), (3, 6), (4, 8))
┌─regr_syy(y, x)─┐
│             20 │
└────────────────┘