ClickHouse/tests/queries/0_stateless/01012_reset_running_accumulate.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
522 B
MySQL
Raw Normal View History

2023-12-08 19:20:48 +00:00
-- Disable external aggregation because the state is reset for each new block of data in 'runningAccumulate' function.
SET max_bytes_before_external_group_by = 0;
SET allow_deprecated_error_prone_window_functions = 1;
2023-12-08 19:20:48 +00:00
2019-12-20 20:56:39 +00:00
SELECT grouping,
item,
runningAccumulate(state, grouping)
FROM (
SELECT number % 6 AS grouping,
number AS item,
sumState(number) AS state
FROM (SELECT number FROM system.numbers LIMIT 30)
GROUP BY grouping, item
ORDER BY grouping, item
2024-04-30 13:09:44 +00:00
);