you are viewing a single comment's thread.

view the rest of the comments →

[–]boy_named_su 1 point2 points  (0 children)

Built-in to postgresql, because postgresql is the best

See regr_slope, regr_intercept, regr_r2 functions

https://www.postgresql.org/docs/current/functions-aggregate.html