ClickHouse/tests/queries/0_stateless/00532_topk_generic.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

2 lines
202 B
SQL

SELECT k, topK(v) FROM (SELECT number % 10 AS k, arrayMap(x -> arrayMap(x -> x = 0 ? NULL : toString(x), range(x)), range(intDiv(number, 13))) AS v FROM system.numbers LIMIT 100) GROUP BY k ORDER BY k;