mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 10:52:30 +00:00
16 lines
391 B
SQL
16 lines
391 B
SQL
|
|
CREATE TABLE table_03002 (ts DateTime, event_type String) ENGINE = MergeTree ORDER BY (event_type, ts);
|
|
|
|
CREATE MATERIALIZED VIEW mv_03002 TO table_03002 AS SELECT ts FROM table_03002;
|
|
|
|
SHOW CREATE TABLE mv_03002;
|
|
|
|
ALTER TABLE mv_03002 MODIFY QUERY
|
|
WITH MY_CTE AS (SELECT ts FROM table_03002)
|
|
SELECT * FROM MY_CTE;
|
|
|
|
SHOW CREATE TABLE mv_03002;
|
|
|
|
DROP TABLE mv_03002;
|
|
DROP TABLE table_03002;
|