mirror of
https://github.com/hanzo-ds/sqlparser.git
synced 2026-10-30 20:53:50 +00:00
11 lines
352 B
SQL
11 lines
352 B
SQL
CREATE TABLE default.test UUID '87887901-e33c-497e-8788-7901e33c997e'
|
|
(
|
|
`f0` DateTime,
|
|
`f1` UInt32,
|
|
`f3` UInt32
|
|
)
|
|
ENGINE = ReplicatedMergeTree('/clickhouse/tables/{layer}/{shard}/default/test', '{replica}')
|
|
PARTITION BY toYYYYMM(timestamp)
|
|
ORDER BY (contractid, toDate(timestamp), userid)
|
|
SAMPLE BY userid
|
|
SETTINGS index_granularity = 8192; |