Aggregates
Aggregate
regr_intercept()
Returns the intercept of the univariate linear regression line for non-null pairs in a group.
Reference: DuckDB 1.3.2
Arguments & returns
regr_intercept(y, x)
Aggregate
| Overload link | y | x |
Returns |
|---|---|---|---|
| #01 | DOUBLE | DOUBLE |
DOUBLE |
Example
Haybarn WASM 2.0.0-rc12 · In your browser
Engine example with sample data · Run to view results.
Catalog examples
SELECT
AVG(y) - REGR_SLOPE(y, x) * AVG(x);