mirror of
https://github.com/umami-software/umami.git
synced 2026-02-20 12:35:38 +01:00
func(session): add ip for clickhouse
This commit is contained in:
parent
4ee98cec8d
commit
f89c08b007
2 changed files with 95 additions and 0 deletions
|
|
@ -86,6 +86,7 @@ CREATE TABLE umami.website_event_stats_hourly
|
|||
country LowCardinality(String),
|
||||
subdivision1 LowCardinality(String),
|
||||
city String,
|
||||
ip String,
|
||||
entry_url AggregateFunction(argMin, String, DateTime('UTC')),
|
||||
exit_url AggregateFunction(argMax, String, DateTime('UTC')),
|
||||
url_path SimpleAggregateFunction(groupArrayArray, Array(String)),
|
||||
|
|
@ -126,6 +127,7 @@ SELECT
|
|||
country,
|
||||
subdivision1,
|
||||
city,
|
||||
ip,
|
||||
entry_url,
|
||||
exit_url,
|
||||
url_paths as url_path,
|
||||
|
|
@ -151,6 +153,7 @@ FROM (SELECT
|
|||
country,
|
||||
subdivision1,
|
||||
city,
|
||||
ip,
|
||||
argMinState(url_path, created_at) entry_url,
|
||||
argMaxState(url_path, created_at) exit_url,
|
||||
arrayFilter(x -> x != '', groupArray(url_path)) as url_paths,
|
||||
|
|
@ -176,6 +179,7 @@ GROUP BY website_id,
|
|||
country,
|
||||
subdivision1,
|
||||
city,
|
||||
ip,
|
||||
event_type,
|
||||
timestamp);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue