有张聚合表
CREATE TABLE IF NOT EXISTS test
(
v_1
VARCHAR(150) NOT NULL,
v_2
VARCHAR(20) REPLACE NULL DEFAULT "0",
cnt
BIGINT SUM DEFAULT "0",
max_dwell_time
INT MAX DEFAULT "0",
min_dwell_time
INT MIN DEFAULT "99999"
)
AGGREGATE KEY(v_1
)
DISTRIBUTED BY HASH(v_1
) BUCKETS AUTO
PROPERTIES (
"replication_allocation" = "tag.location.default: 1"
);
想对以下查询
select v_2 from test group by v_2;
创建物化视图