15 lines
492 B
Plaintext
15 lines
492 B
Plaintext
|
SCHEMA >
|
||
|
`site_uuid` String,
|
||
|
`date` Date,
|
||
|
`session_id` String,
|
||
|
`device` SimpleAggregateFunction(any, String),
|
||
|
`browser` SimpleAggregateFunction(any, String),
|
||
|
`location` SimpleAggregateFunction(any, String),
|
||
|
`first_hit` SimpleAggregateFunction(min, DateTime),
|
||
|
`latest_hit` SimpleAggregateFunction(max, DateTime),
|
||
|
`hits` AggregateFunction(count)
|
||
|
|
||
|
ENGINE AggregatingMergeTree
|
||
|
ENGINE_PARTITION_KEY toYYYYMM(date)
|
||
|
ENGINE_SORTING_KEY date, session_id, site_uuid
|