2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists table;
|
2018-12-05 16:41:19 +00:00
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
CREATE TABLE table (a UInt32, date Date, b UInt64, c UInt64, str String, d Int8, arr Array(UInt64), arr_alias Array(UInt64) ALIAS arr) ENGINE = MergeTree(date, intHash32(c), (a, date, intHash32(c), b), 8192);
|
2018-12-05 16:41:19 +00:00
|
|
|
|
|
|
|
SELECT alias2 AS alias3
|
2019-04-16 14:13:13 +00:00
|
|
|
FROM table
|
2018-12-05 16:41:19 +00:00
|
|
|
ARRAY JOIN
|
|
|
|
arr_alias AS alias2,
|
|
|
|
arrayEnumerateUniq(arr_alias) AS _uniq_Event
|
|
|
|
WHERE (date = toDate('2010-10-10')) AND (a IN (2, 3)) AND (str NOT IN ('z', 'x')) AND (d != -1)
|
|
|
|
LIMIT 1;
|
|
|
|
|
2019-04-16 14:13:13 +00:00
|
|
|
drop table if exists table;
|
2018-12-05 16:41:19 +00:00
|
|
|
|