mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-10-18 22:40:50 +00:00
824255f603
The following has been used for this: git grep '^CREATE' tests/queries/**.reference | cut -d: -f1 | sort -u | xargs -n1 -i sh -c 'show-create-rewrite.py < {} | sponge {}' show-create-rewrite.py is available here: https://gist.github.com/azat/916b98b5ddf9573f7dc9a4dce33b59b5 And for 00998_constraints_all_tables test FORMAT TSVRaw I simply drop.
33 lines
560 B
Plaintext
33 lines
560 B
Plaintext
CREATE MATERIALIZED VIEW test_00751.t_mv_00751
|
|
(
|
|
`date` Date,
|
|
`platform` Enum8('a' = 0, 'b' = 1),
|
|
`app` Enum8('a' = 0, 'b' = 1)
|
|
)
|
|
ENGINE = MergeTree
|
|
ORDER BY date
|
|
SETTINGS index_granularity = 8192 AS
|
|
SELECT
|
|
date,
|
|
platform,
|
|
app
|
|
FROM test_00751.t_00751
|
|
WHERE (app =
|
|
(
|
|
SELECT min(app)
|
|
FROM test_00751.u_00751
|
|
)) AND (platform =
|
|
(
|
|
SELECT
|
|
(
|
|
SELECT min(platform)
|
|
FROM test_00751.v_00751
|
|
)
|
|
))
|
|
2000-01-01 a a
|
|
2000-01-02 b b
|
|
2000-01-03 a a
|
|
2000-01-04 b b
|
|
2000-01-02 b b
|
|
2000-01-03 a a
|