ClickHouse/dbms/tests/queries/0_stateless/00208_agg_state_merge.sql

2 lines
242 B
MySQL
Raw Normal View History

2015-07-26 12:06:29 +00:00
SELECT k % 7 AS k2, finalizeAggregation(uniqMergeState(state)), uniqMerge(state) FROM (SELECT k, uniqState(x) AS state FROM (SELECT number % 11 AS k, intDiv(number, 7) AS x FROM system.numbers LIMIT 100) GROUP BY k) GROUP BY k2 ORDER BY k2;