ClickHouse/dbms/tests/queries/0_stateless/00252_shard_global_in_aggregate_function.sql

7 lines
580 B
MySQL
Raw Normal View History

DROP TABLE IF EXISTS test.storage;
CREATE TABLE test.storage(UserID UInt64) ENGINE=Memory;
INSERT INTO test.storage(UserID) values (6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(6460432721393873721)(402895971392036118)(402895971392036118)(402895971392036118);
2018-01-29 10:01:18 +00:00
SELECT sum(UserID GLOBAL IN (SELECT UserID FROM remote('127.0.0.{2,3}', test.storage))) FROM remote('127.0.0.{2,3}', test.storage);
SELECT sum(UserID GLOBAL IN (SELECT UserID FROM test.storage)) FROM remote('127.0.0.{2,3}', test.storage);