mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
add projection code
This commit is contained in:
parent
9882ff24f6
commit
61dfa1391e
1 changed files with 16 additions and 1 deletions
|
|
@ -171,3 +171,18 @@ GROUP BY website_id,
|
|||
city,
|
||||
event_type,
|
||||
timestamp);
|
||||
|
||||
-- projections
|
||||
ALTER TABLE umami.website_event
|
||||
ADD PROJECTION website_event_url_path_projection (
|
||||
SELECT * ORDER BY toStartOfDay(created_at), website_id, url_path, created_at
|
||||
);
|
||||
|
||||
ALTER TABLE umami.website_event MATERIALIZE PROJECTION website_event_url_path_projection;
|
||||
|
||||
ALTER TABLE umami.website_event
|
||||
ADD PROJECTION website_event_referrer_domain_projection (
|
||||
SELECT * ORDER BY toStartOfDay(created_at), website_id, referrer_domain, created_at
|
||||
);
|
||||
|
||||
ALTER TABLE umami.website_event MATERIALIZE PROJECTION website_event_referrer_domain_projection;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue