Aggregates Aggregate

regr_slope()

Returns the slope of the linear regression line for non-null pairs in a group.

Arguments & returns

regr_slope(y, x)

Aggregate
Overload link yx Returns
#01 DOUBLEDOUBLE DOUBLE

Example

regr_slope example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example with sample data · Run to view results.

Catalog examples

SELECT
  COVAR_POP(x, y) / VAR_POP(x);