diff --git a/dbms/tests/queries/0_stateless/00953_moving_sum.reference b/dbms/tests/queries/0_stateless/00953_moving_sum.reference index 183f49f3c20..844d42700aa 100644 --- a/dbms/tests/queries/0_stateless/00953_moving_sum.reference +++ b/dbms/tests/queries/0_stateless/00953_moving_sum.reference @@ -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] diff --git a/dbms/tests/queries/0_stateless/00953_moving_sum.sql b/dbms/tests/queries/0_stateless/00953_moving_sum.sql index a22b1254218..f2ce3f5c431 100644 --- a/dbms/tests/queries/0_stateless/00953_moving_sum.sql +++ b/dbms/tests/queries/0_stateless/00953_moving_sum.sql @@ -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;