mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
Updated test [#CLICKHOUSE-3]
This commit is contained in:
parent
72e4963248
commit
ce67ebdded
@ -0,0 +1 @@
|
||||
nan
|
@ -1,7 +1,7 @@
|
||||
DROP TABLE IF EXISTS users.perf;
|
||||
CREATE TABLE users.perf (site String, user_id UInt64, z Float64) ENGINE = Log;
|
||||
DROP TABLE IF EXISTS test.perf;
|
||||
CREATE TABLE test.perf (site String, user_id UInt64, z Float64) ENGINE = Log;
|
||||
|
||||
SELECT * FROM (SELECT perf_1.z AS z_1 FROM users.perf AS perf_1);
|
||||
SELECT * FROM (SELECT perf_1.z AS z_1 FROM test.perf AS perf_1);
|
||||
|
||||
SELECT sum(mul)/sqrt(sum(sqr_dif_1) * sum(sqr_dif_2)) AS z_r
|
||||
FROM(
|
||||
@ -10,11 +10,11 @@ SELECT
|
||||
avg(z_2) AS z_2_avg
|
||||
FROM (
|
||||
SELECT perf_1.site, perf_1.z AS z_1
|
||||
FROM users.perf AS perf_1
|
||||
FROM test.perf AS perf_1
|
||||
WHERE user_id = 000
|
||||
) ALL INNER JOIN (
|
||||
SELECT perf_2.site, perf_2.z AS z_2
|
||||
FROM users.perf AS perf_2
|
||||
FROM test.perf AS perf_2
|
||||
WHERE user_id = 999
|
||||
) USING site) as avg_values,
|
||||
z_1 - avg_values.1 AS dif_1,
|
||||
@ -24,12 +24,12 @@ SELECT
|
||||
dif_2*dif_2 AS sqr_dif_2
|
||||
FROM (
|
||||
SELECT perf_1.site, perf_1.z AS z_1
|
||||
FROM users.perf AS perf_1
|
||||
FROM test.perf AS perf_1
|
||||
WHERE user_id = 000
|
||||
) ALL INNER JOIN (
|
||||
SELECT perf_2.site, perf_2.z AS z_2
|
||||
FROM users.perf AS perf_2
|
||||
FROM test.perf AS perf_2
|
||||
WHERE user_id = 999
|
||||
) USING site);
|
||||
|
||||
DROP TABLE users.perf;
|
||||
DROP TABLE test.perf;
|
||||
|
Loading…
Reference in New Issue
Block a user