mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Fixed realtime chart for relational. Removed getDateArray. Added chart min/max dates.
This commit is contained in:
parent
9311f0a183
commit
647dcb5f25
7 changed files with 46 additions and 46 deletions
|
|
@ -22,14 +22,21 @@ async function relationalQuery(websiteId: string, filters: QueryFilters) {
|
|||
return rawQuery(
|
||||
`
|
||||
select
|
||||
${getDateSQL('website_event.created_at', unit, timezone)} x,
|
||||
count(distinct website_event.session_id) y
|
||||
from website_event
|
||||
${getDateSQL('g.created_at', unit, timezone)} as x,
|
||||
count(distinct g.session_id) as y
|
||||
from (
|
||||
select
|
||||
website_event.session_id,
|
||||
min(website_event.created_at) as created_at,
|
||||
count(*) y
|
||||
from website_event
|
||||
${joinSession}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
where website_event.website_id = {{websiteId::uuid}}
|
||||
and website_event.created_at between {{startDate}} and {{endDate}}
|
||||
and event_type = {{eventType}}
|
||||
and event_type = {{eventType}}
|
||||
${filterQuery}
|
||||
group by website_event.session_id, website_event.created_at
|
||||
) as g
|
||||
group by 1
|
||||
`,
|
||||
params,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue