REGR_R2 Function | VantageCloud Lake - REGR_R2 - Teradata VantageCloud Lake

Lake - Working with SQL

Deployment
VantageCloud
Edition
Lake
Product
Teradata VantageCloud Lake
Release Number
Published
February 2025
ft:locale
en-US
ft:lastEdition
2025-11-21
dita:mapPath
jbe1714339405530.ditamap
dita:ditavalPath
pny1626732985837.ditaval
dita:id
jbe1714339405530

Returns the coefficient of determination for all non-null data pairs of the dependent and independent variable arguments.

For the REGR_R2 window function that performs a group, cumulative, or moving computation, see Window Aggregate Functions.

Computation

When there are fewer than two non-null data point pairs in the data used for the computation, then REGR_R2 returns NULL.

Division by zero returns NULL rather than an error.

ANSI Compliance

This statement is ANSI SQL:2011 compliant.