> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-detect-table-modification.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Returns the sum of squares of the dependent variable around its mean.

# regr_syy

<h2 id="regr_syy">
  regr\_syy
</h2>

Introduced in: v26.9.0

Returns the sum of squares of the dependent variable:

$$
\Sigma{(y - \bar{y})^2}
$$

**Syntax**

```sql theme={null}
regr_syy(y, x)
```

**Aliases**: `regrSYY`

**Arguments**

* `y` — Dependent variable. [`(U)Int*`](/reference/data-types/int-uint) or [`Float*`](/reference/data-types/float)
* `x` — Independent variable. [`(U)Int*`](/reference/data-types/int-uint) or [`Float*`](/reference/data-types/float)

**Returned value**

Returns the sum of squares of `y` around its mean. [`Float64`](/reference/data-types/float)

**Examples**

**Basic usage**

```sql title=Query theme={null}
SELECT regr_syy(y, x)
FROM VALUES('x Float64, y Float64', (1, 2), (2, 4), (3, 6), (4, 8))
```

```response title=Response theme={null}
┌─regr_syy(y, x)─┐
│             20 │
└────────────────┘
```
