ClickHouse/dbms/tests/queries/0_stateless/00040_array_enumerate_uniq.sql
Vadim b8ae9f7951 [CLICKHOUSE-2830] add FunctionArrayDistinct (#2670)
* [CLICKHOUSE-2830] add FunctionArrayDistinct

* [#CLICKHOUSE-2830] Add tests and fix

* [CLICKHOUSE-2830] fix bug with array without NULL

* [CLICKHOUSE-2830] fix test

* [CLICKHOUSE-3844] Add suport Tuple and other types in Uniq, EnumerateUniq and Distinct

* [CLICKHOUSE-3844] Add '\n'

* [CLICKHOUSE-3844] fix

* [CLICKHOUSE-2830] del Nullable return type

* Update FunctionsArray.cpp

* [CLICKHOUSE-3844] add new tests

* [CLICKHOUSE-3844] add new tests
2018-07-19 16:53:32 +03:00

6 lines
352 B
SQL

SELECT max(arrayJoin(arr)) FROM (SELECT arrayEnumerateUniq(groupArray(intDiv(number, 54321)) AS nums, groupArray(toString(intDiv(number, 98765)))) AS arr FROM (SELECT number FROM system.numbers LIMIT 1000000) GROUP BY intHash32(number) % 100000);
SELECT arrayEnumerateUniq([[1], [2], [34], [1]]);
SELECT arrayEnumerateUniq([(1, 2), (3, 4), (1, 2)]);