mirror of
https://github.com/kremalicious/umami.git
synced 2025-01-11 21:45:53 +01:00
fix CH query
This commit is contained in:
parent
b6cd9f305b
commit
92acd8c1a7
@ -43,7 +43,7 @@ async function clickhouseQuery(
|
|||||||
unit = 'day',
|
unit = 'day',
|
||||||
filters = {},
|
filters = {},
|
||||||
) {
|
) {
|
||||||
const { rawQuery, getDateQuery, getBetweenDates } = prisma;
|
const { rawQuery, getDateQuery, getBetweenDates, getFilterQuery } = clickhouse;
|
||||||
const params = [website_id];
|
const params = [website_id];
|
||||||
|
|
||||||
return rawQuery(
|
return rawQuery(
|
||||||
@ -54,7 +54,7 @@ async function clickhouseQuery(
|
|||||||
from event
|
from event
|
||||||
where website_id= $1
|
where website_id= $1
|
||||||
and ${getBetweenDates('created_at', start_at, end_at)}
|
and ${getBetweenDates('created_at', start_at, end_at)}
|
||||||
${clickhouse.getFilterQuery('event', filters, params)}
|
${getFilterQuery('event', filters, params)}
|
||||||
group by x, t
|
group by x, t
|
||||||
order by t`,
|
order by t`,
|
||||||
params,
|
params,
|
||||||
|
Loading…
Reference in New Issue
Block a user