attempt adding event data rows to output
not trying to join yet, just poking aroundpull/2022/head
parent
586529a5ca
commit
6de82cfd5e
|
@ -69,6 +69,7 @@ export interface WebsiteActive {
|
|||
export interface WebsiteMetric {
|
||||
x: string;
|
||||
y: number;
|
||||
d?: unknown;
|
||||
}
|
||||
|
||||
export interface WebsiteMetricFilter {
|
||||
|
@ -90,6 +91,7 @@ export interface WebsiteEventMetric {
|
|||
x: string;
|
||||
t: string;
|
||||
y: number;
|
||||
d?: unknown;
|
||||
}
|
||||
|
||||
export interface WebsiteEventDataMetric {
|
||||
|
|
|
@ -54,6 +54,7 @@ async function relationalQuery(
|
|||
return rawQuery(
|
||||
`select
|
||||
event_name x,
|
||||
event_data d,
|
||||
${getDateQuery('created_at', unit, timezone)} t,
|
||||
count(*) y
|
||||
from website_event
|
||||
|
@ -62,8 +63,8 @@ async function relationalQuery(
|
|||
and created_at between $3 and $4
|
||||
and event_type = ${EVENT_TYPE.customEvent}
|
||||
${filterQuery}
|
||||
group by 1, 2
|
||||
order by 2`,
|
||||
group by 1, 3
|
||||
order by 3`,
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
@ -95,6 +96,7 @@ async function clickhouseQuery(
|
|||
return rawQuery(
|
||||
`select
|
||||
event_name x,
|
||||
event_data d,
|
||||
${getDateQuery('created_at', unit, timezone)} t,
|
||||
count(*) y
|
||||
from website_event
|
||||
|
|
Loading…
Reference in New Issue