@@ -73,7 +73,7 @@ async function relationalQuery(
7373 for ( let i = 1 ; i <= steps ; i ++ ) {
7474 const endQuery = i < steps ? ',' : '' ;
7575 selectQuery += `s.e${ i } ,` ;
76- maxQuery += `\nmax(CASE WHEN event_number = ${ i } THEN event ELSE NULL END) AS e${ i } ${ endQuery } ` ;
76+ maxQuery += `\nmax(CASE WHEN event_number = ${ i } THEN " event" ELSE NULL END) AS e${ i } ${ endQuery } ` ;
7777 groupByQuery += `s.e${ i } ${ endQuery } ` ;
7878 }
7979
@@ -185,7 +185,7 @@ async function clickhouseQuery(
185185 for ( let i = 1 ; i <= steps ; i ++ ) {
186186 const endQuery = i < steps ? ',' : '' ;
187187 selectQuery += `s.e${ i } ,` ;
188- maxQuery += `\nmax(CASE WHEN event_number = ${ i } THEN event ELSE NULL END) AS e${ i } ${ endQuery } ` ;
188+ maxQuery += `\nmax(CASE WHEN event_number = ${ i } THEN " event" ELSE NULL END) AS e${ i } ${ endQuery } ` ;
189189 groupByQuery += `s.e${ i } ${ endQuery } ` ;
190190 }
191191
@@ -230,7 +230,7 @@ async function clickhouseQuery(
230230 WITH events AS (
231231 select distinct
232232 visit_id,
233- coalesce(nullIf(event_name, ''), url_path) event,
233+ coalesce(nullIf(event_name, ''), url_path) " event" ,
234234 row_number() OVER (PARTITION BY visit_id ORDER BY created_at) AS event_number
235235 from website_event
236236 ${ cohortQuery }
0 commit comments