mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-24 08:32:02 +00:00
ForEach combinator of aggregate functions: more tests [#CLICKHOUSE-2952].
This commit is contained in:
parent
3fa1639877
commit
8ba5ef7a4d
@ -22,3 +22,7 @@
|
||||
1 [['0','0','0'],['1','1','1'],['2','2','2'],['3','3'],['4']]
|
||||
2 [['0','0','0'],['1','1','1'],['2','2','2'],['3','3','3'],['4','4','4'],['5','5','5'],['6','6'],['7']]
|
||||
3 [['0'],['1'],['2'],['3'],['4'],['5'],['6'],['7'],['8']]
|
||||
0 [[1,2],[3]] [[2,2],[3,3]]
|
||||
1 [[3,4,5],[4,5,6],[5,6,7],[7,8],[9]] [[4,5],[5,6],[6,7],[8,8],[9,9]]
|
||||
2 [[6,7,8],[7,8,9],[8,9,10],[9,10,11],[10,11,12],[11,12,13],[13,14],[15]] [[7,8],[8,9],[9,10],[10,11],[11,12],[12,13],[14,14],[15,15]]
|
||||
3 [[9],[10],[11],[12],[13],[14],[15],[16],[17]] [[9,9],[10,10],[11,11],[12,12],[13,13],[14,14],[15,15],[16,16],[17,17]]
|
||||
|
@ -19,3 +19,5 @@ SELECT k, groupArrayForEach(arr) FROM (SELECT intDiv(number, 3) AS k, range(numb
|
||||
|
||||
SELECT k, groupArrayForEach(arr) FROM (SELECT number % 3 AS k, arrayMap(x -> toString(x), range(number)) AS arr FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k;
|
||||
SELECT k, groupArrayForEach(arr) FROM (SELECT intDiv(number, 3) AS k, arrayMap(x -> toString(x), range(number)) AS arr FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k;
|
||||
|
||||
SELECT k, groupArrayForEach(arr), quantilesExactForEach(0.5, 0.9)(arr) FROM (SELECT intDiv(number, 3) AS k, arrayMap(x -> number + x, range(number)) AS arr FROM system.numbers LIMIT 10) GROUP BY k ORDER BY k;
|
||||
|
Loading…
Reference in New Issue
Block a user