This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ----------------------- SimpleAggregateFunction + groupArrayArray ---------------------------- | |
| drop table if exists states_raw; | |
| drop table if exists final_states_by_month; | |
| drop table if exists final_states_by_month_mv; | |
| CREATE TABLE states_raw(d date, uid UInt64, s String) ENGINE = Null; | |
| CREATE TABLE final_states_by_month(d date, uid UInt64, a_state SimpleAggregateFunction(groupArrayArray, Array(String))) | |
| ENGINE = AggregatingMergeTree PARTITION BY toYYYYMM(d) ORDER BY (uid); |