mirror of
https://github.com/umami-software/umami.git
synced 2026-02-12 00:27:11 +01:00
Split out session query.
This commit is contained in:
parent
7b9c29e039
commit
4497951000
9 changed files with 139 additions and 56 deletions
|
|
@ -28,8 +28,8 @@ async function relationalQuery(
|
|||
|
||||
return rawQuery(
|
||||
`select ${column} x, count(*) y
|
||||
from session as x
|
||||
where x.session_id in (
|
||||
from session as s
|
||||
where s.session_id in (
|
||||
select website_event.session_id
|
||||
from website_event
|
||||
join website
|
||||
|
|
@ -38,7 +38,7 @@ async function relationalQuery(
|
|||
where website.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
${filterQuery}
|
||||
)
|
||||
) as t
|
||||
group by 1
|
||||
order by 2 desc
|
||||
limit 100`,
|
||||
|
|
@ -64,7 +64,7 @@ async function clickhouseQuery(
|
|||
`
|
||||
select
|
||||
${column} x, count(distinct session_id) y
|
||||
from website_event as x
|
||||
from website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime} and {endDate:DateTime}
|
||||
and event_type = {eventType:UInt32}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue