mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
add getEventDataFields
This commit is contained in:
parent
29044de736
commit
e440779c7a
4 changed files with 123 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ async function relationalQuery(
|
|||
async function clickhouseQuery(
|
||||
websiteId: string,
|
||||
filters: QueryFilters & { eventName?: string; propertyName?: string },
|
||||
): Promise<{ propertyName: string; dataType: number; propertyValue: string; total: number }[]> {
|
||||
): Promise<{ value: string; total: number }[]> {
|
||||
const { rawQuery, parseFilters } = clickhouse;
|
||||
const { filterQuery, params } = await parseFilters(websiteId, filters);
|
||||
|
||||
|
|
@ -66,7 +66,7 @@ async function clickhouseQuery(
|
|||
and data_key = {propertyName:String}
|
||||
and event_name = {eventName:String}
|
||||
${filterQuery}
|
||||
group by event_name, value
|
||||
group by value
|
||||
order by 2 desc
|
||||
limit 100
|
||||
`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue