mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-18 05:32:52 +00:00
2 lines
202 B
SQL
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;
|