mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 09:35:36 +01:00
refactor views and queries for dashboard
This commit is contained in:
parent
bfd5c5f150
commit
f518066d93
7 changed files with 34 additions and 43 deletions
|
|
@ -46,7 +46,7 @@ async function clickhouseQuery(
|
|||
...filters,
|
||||
eventType: EVENT_TYPE.pageView,
|
||||
});
|
||||
const table = unit === 'hour' ? 'website_event_metric_hourly' : 'website_event_metric_daily';
|
||||
const table = unit === 'hour' ? 'website_event_stats_hourly' : 'website_event_stats_daily';
|
||||
|
||||
return rawQuery(
|
||||
`
|
||||
|
|
@ -56,7 +56,7 @@ async function clickhouseQuery(
|
|||
from (
|
||||
select
|
||||
${getDateQuery('created_at', unit, timezone)} as t,
|
||||
countMerge(views) as y
|
||||
sum(views) as y
|
||||
from ${table} website_event
|
||||
where website_id = {websiteId:UUID}
|
||||
and created_at between {startDate:DateTime64} and {endDate:DateTime64}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue