mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
fix clickhouse calls (#1536)
This commit is contained in:
parent
dfac7e1af5
commit
78c3453639
10 changed files with 41 additions and 34 deletions
|
|
@ -52,7 +52,8 @@ async function clickhouseQuery(
|
|||
${getDateQuery('created_at', unit, timezone)} t,
|
||||
count(*) y
|
||||
from event
|
||||
where website_id= $1
|
||||
where event_name != ''
|
||||
and website_id= $1
|
||||
and ${getBetweenDates('created_at', start_at, end_at)}
|
||||
${getFilterQuery('event', filters, params)}
|
||||
group by x, t
|
||||
|
|
|
|||
|
|
@ -31,12 +31,13 @@ function clickhouseQuery(websites, start_at) {
|
|||
`select
|
||||
event_uuid,
|
||||
website_id,
|
||||
session_id,
|
||||
session_uuid,
|
||||
created_at,
|
||||
url,
|
||||
event_name
|
||||
from event
|
||||
where website_id in (${websites.join[',']}
|
||||
and created_at >= ${getDateFormat(start_at)})`,
|
||||
where event_name != ''
|
||||
and ${websites && websites.length > 0 ? `website_id in (${websites.join(',')})` : '0 = 0'}
|
||||
and created_at >= ${getDateFormat(start_at)}`,
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue