mirror of
https://github.com/umami-software/umami.git
synced 2026-02-08 14:47:14 +01:00
update dashboard queries to use mv
This commit is contained in:
parent
5289c277fb
commit
bfd5c5f150
5 changed files with 44 additions and 12 deletions
|
|
@ -46,6 +46,7 @@ async function clickhouseQuery(
|
|||
...filters,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
});
|
||||
const table = unit === 'hour' ? 'website_event_metric_hourly' : 'website_event_metric_daily';
|
||||
|
||||
return rawQuery(
|
||||
`
|
||||
|
|
@ -55,8 +56,8 @@ async function clickhouseQuery(
|
|||
from (
|
||||
select
|
||||
${getDateQuery('created_at', unit, timezone)} as t,
|
||||
count(distinct session_id) as y
|
||||
from website_event
|
||||
uniq(session_id) as y
|
||||
from ${table} website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
and event_type = {eventType:UInt32}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue