ClickHouse/tests/queries/1_stateful/00169_contingency.sql
Alexey Milovidov 420baf54bd Add tests
2022-01-03 00:30:16 +03:00

15 lines
1.0 KiB
SQL

WITH URLDomain AS a, URLDomain AS b
SELECT round(cramersV(a, b), 2), round(cramersVBiasCorrected(a, b), 2), round(theilsU(a, b), 2), round(theilsU(b, a), 2), round(contingency(a, b), 2) FROM test.hits;
WITH URLDomain AS a, RefererDomain AS b
SELECT round(cramersV(a, b), 2), round(cramersVBiasCorrected(a, b), 2), round(theilsU(a, b), 2), round(theilsU(b, a), 2), round(contingency(a, b), 2) FROM test.hits;
WITH URLDomain AS a, CounterID AS b
SELECT round(cramersV(a, b), 2), round(cramersVBiasCorrected(a, b), 2), round(theilsU(a, b), 2), round(theilsU(b, a), 2), round(contingency(a, b), 2) FROM test.hits;
WITH ClientIP AS a, RemoteIP AS b
SELECT round(cramersV(a, b), 2), round(cramersVBiasCorrected(a, b), 2), round(theilsU(a, b), 2), round(theilsU(b, a), 2), round(contingency(a, b), 2) FROM test.hits;
WITH ResolutionWidth AS a, ResolutionHeight AS b
SELECT round(cramersV(a, b), 2), round(cramersVBiasCorrected(a, b), 2), round(theilsU(a, b), 2), round(theilsU(b, a), 2), round(contingency(a, b), 2) FROM test.hits;