2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS test;
|
2018-01-21 09:29:55 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE test ( s String, i Int64) ENGINE = Memory;
|
2018-01-21 09:29:55 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
INSERT INTO test VALUES('test_string', 1);
|
2018-01-21 09:29:55 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
SELECT s, SUM(i*2) AS i FROM test GROUP BY s UNION ALL SELECT s, SUM(i*2) AS i FROM test GROUP BY s;
|
|
|
|
SELECT s FROM (SELECT s, SUM(i*2) AS i FROM test GROUP BY s UNION ALL SELECT s, SUM(i*2) AS i FROM test GROUP BY s);
|
2018-01-21 09:29:55 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
DROP TABLE IF EXISTS test;
|