ИЦ
Size: a a a
ИЦ
Д
ИЦ
AR
D
AR
🌍
DT
DT
AR
DT
DT
D
select
…
from table_name where (..) in ( select … from table_name)
DT
DT
D
where (..) in ( select … from table_name)
DT
where (..) in ( select … from table_name)
D
where (..) in ( select … from table_name)
CREATE TABLE tmp1 (
`key` String,
`val` Int32
) ENGINE = MergeTree()
ORDER BY key
CREATE TABLE tmp2 (
`key` String,
`val` Int32
) ENGINE = MergeTree()
ORDER BY key
CREATE MATERIALIZED VIEW mv_tmp1_to_tmp2 TO tmp2 (
`key` String,
`val` Int32
) AS
SELECT
key,
sum(val) as val
FROM tmp1 where key in (
SELECT distinct key FROM tmp1
)
group by key
insert into tmp1 values ('1', 1)
insert into tmp1 values ('1', 1)
select * from tmp1
| key | val |
| 1 | 1 |
| 1 | 1 |
select * from tmp2
| key | val |
| 1 | 1 |
| 1 | 1 |
D
DT