Persist umami sql queries and stuff

This commit is contained in:
2025-11-18 15:24:07 +01:00
parent 444f7a376e
commit 87dd246d09
12 changed files with 262 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
select
s.distinct_id,
count(distinct w.visit_id)
from
website_event as w
join
session as s
on s.session_id = w.session_id
where
w.website_id = '16e7d807-4db5-45fd-92a9-27393445a153'
and w.event_type = 1
and w.created_at between '2025-10-13' and '2025-10-19'
and s.distinct_id is not null
and substring(s.distinct_id similar '%#"@%#"' escape '#') not in ('@oceanbox.io')
group by
s.distinct_id
order by
count desc
;