ClickHouse/tests/queries/0_stateless/00291_array_reduce.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

8 lines
373 B
SQL

SELECT
arrayReduce('uniq', [1, 2, 1]) AS a,
arrayReduce('uniq', [1, 2, 2, 1], ['hello', 'world', '', '']) AS b,
arrayReduce('uniqUpTo(5)', [1, 2, 2, 1], materialize(['hello', 'world', '', ''])) AS c,
arrayReduce('uniqExactIf', [1, 2, 3, 4], [1, 0, 1, 1]) AS d;
SELECT arrayReduce('quantiles(0.5, 0.9)', range(number) AS r), r FROM system.numbers LIMIT 12;