This example omits the PARTITION BY clause, so the function determines the correlation values for the overall population and does not group the data by state.
Input
- corr_input, as in Correlation Example: Include PARTITION BY
SQL Call
SELECT * FROM CorrelationReduce ( ON CorrelationMap ( ON corr_input USING TargetColumns ('[2:3]','employed:gdp','employed:unemployed','employed:armedforces') KeyName ('keys') ) PARTITION BY keys ) AS dt;
Output
corr_item1 corr_item2 value_col ----------- ----------- ------------------ gdpdeflator gdp 1.0 armedforces employed 0.4573073983192444 unemployed employed 0.5024980902671814 gdp employed 0.9835516214370728 gdp gdp 1.0 gdpdeflator gdpdeflator 1.0
Download a zip file of all examples and a SQL script file that creates their input tables from the attachment in the left sidebar.