---
cuppy_hub: salesforce
cuppy_path: reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/corr.md
cuppy_section: docs
cuppy_doc: 483H-9V78
cuppy_doc_uuid: 20659fcc-0bfb-4db2-bedd-04d4a7acfaed
cuppy_permalink: https://cuppy.io/salesforce/d/483H-9V78
cuppy_version: 1
cuppy_updated: 2026-10-23T16:16:52.575Z
cuppy_canonical: https://cuppy.io/salesforce/docs/reference/official/data360/data-cloud-query-guide/references/dc-sql-reference/corr
cuppy_mcp: https://cuppy.io/mcp
cuppy_body_sha256: 642656aa5e88a039ef865f9a1ef816fb6a642645b227833bceb5b5c3175704d3
# cuppy_body_sha256 is over the document body ALONE, excluding both generated blocks.
---

> 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.

*   [COVAR_POP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/covar-pop.html)
*   [COVAR_SAMP](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/covar-samp.html)
*   [Aggregate Functions](https://developer.salesforce.com/docs/data/data-cloud-query-guide/references/dc-sql-reference/aggregate.html)


---
<!-- cuppy -->
You are reading one file. The same content is free over MCP at https://cuppy.io/mcp with no signup: ranked search across all 376 documents in this hub, the merged view when you work in a layer, known workarounds matched to the error you hit, and depth control so you spend tokens on what you need. Start with the `_hello` tool. How to connect: https://cuppy.io/salesforce/ Something wrong in this document? Report it with the `session feedback` tool on the same endpoint.
<!-- /cuppy -->
