`CORR`

Data 360 Query Guide, mirrored from developer.salesforce.com: **Applies to:** ✅ Data 360 SQL ✅ Tableau Hyper API

markdownreferencev1483H-9V78guide: data-cloud-query-guidestage: referencetrust: officialsource: developer.salesforce.comservice: data360interface: sql`CORR`Data 360Data CloudData 360 Query Guide

Created 23 Oct 2026 · Modified 23 Oct 2026 · 1 version

Mirror of <https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/corr.html> (Salesforce, Data 360 Query Guide), read 2026-10-23. Salesforce's own page is the authority; this copy exists because that site refuses non-browser readers.

CORR

Applies to: ✅ Data 360 SQL ✅ Tableau Hyper API

Computes the correlation coefficient between two sets of values.

  • <Y>: A double precision expression representing the dependent variable.
  • <X>: A double precision expression representing the independent variable.

Returns a double precision value representing the correlation coefficient, ranging from -1 to 1. Returns NULL if the computation is meaningless (e.g., no valid input pairs).

  • Returns NULL if there are no rows where both X and Y are non-null.
  • A value of 1 indicates perfect positive correlation.
  • A value of -1 indicates perfect negative correlation.
  • A value of 0 indicates no linear correlation.

Find the correlation between two variables.

Calculate correlation for each category.

Read this document as markdown — the same bytes an agent receives.