ClickHouse/tests/queries/0_stateless/01012_reset_running_accumulate.sql
Ivan 97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00

11 lines
302 B
SQL

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
);