mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 15:12:02 +00:00
movingSum test fix: source table order
This commit is contained in:
parent
1e56a5b7ac
commit
1c7037d270
@ -1,9 +1,4 @@
|
||||
k dt v
|
||||
b 2001-02-03 01:00:00 5
|
||||
b 2001-02-03 01:00:01 6
|
||||
b 2001-02-03 01:00:02 7
|
||||
b 2001-02-03 01:00:03 8
|
||||
b 2001-02-03 01:00:04 9
|
||||
a 2001-02-03 00:00:00 0
|
||||
a 2001-02-03 00:00:01 1
|
||||
a 2001-02-03 00:00:02 2
|
||||
@ -14,6 +9,11 @@ b 2001-02-03 00:00:01 1
|
||||
b 2001-02-03 00:00:02 2
|
||||
b 2001-02-03 00:00:03 3
|
||||
b 2001-02-03 00:00:04 4
|
||||
b 2001-02-03 01:00:00 5
|
||||
b 2001-02-03 01:00:01 6
|
||||
b 2001-02-03 01:00:02 7
|
||||
b 2001-02-03 01:00:03 8
|
||||
b 2001-02-03 01:00:04 9
|
||||
k movingSum(v)
|
||||
String Array(UInt64)
|
||||
a [0,1,3,6,10]
|
||||
|
@ -22,7 +22,7 @@ INSERT INTO moving_sum_num
|
||||
FROM system.numbers
|
||||
LIMIT 5;
|
||||
|
||||
SELECT * FROM moving_sum_num FORMAT TabSeparatedWithNames;
|
||||
SELECT * FROM moving_sum_num ORDER BY k,dt FORMAT TabSeparatedWithNames;
|
||||
|
||||
SELECT k, movingSum(v) FROM (SELECT * FROM moving_sum_num ORDER BY k, dt) GROUP BY k ORDER BY k FORMAT TabSeparatedWithNamesAndTypes;
|
||||
SELECT k, movingSum(3)(v) FROM (SELECT * FROM moving_sum_num ORDER BY k, dt) GROUP BY k ORDER BY k FORMAT TabSeparatedWithNamesAndTypes;
|
||||
|
Loading…
Reference in New Issue
Block a user