From 8b309abb8523d1309e6cebc98668977d83225c61 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Thu, 21 Sep 2023 15:07:12 +0100 Subject: [PATCH] smell --- plugin-server/functional_tests/api.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin-server/functional_tests/api.ts b/plugin-server/functional_tests/api.ts index 29bf5c9a67b00..6d16cdb41a498 100644 --- a/plugin-server/functional_tests/api.ts +++ b/plugin-server/functional_tests/api.ts @@ -301,9 +301,9 @@ export const fetchPostgresPersons = async (teamId: number) => { export const fetchSessionReplayEvents = async (teamId: number, sessionId?: string) => { const queryResult = (await clickHouseClient.querying( - `SELECT min(min_first_timestamp), any(team_id), any(distinct_id), session_id FROM session_replay_events WHERE team_id = ${teamId} ${ + `SELECT min(min_first_timestamp) as min_fs_ts, any(team_id), any(distinct_id), session_id FROM session_replay_events WHERE team_id = ${teamId} ${ sessionId ? ` AND session_id = '${sessionId}'` : '' - } group by session_id ORDER BY min_first_timestamp ASC` + } group by session_id ORDER BY min_fs_ts ASC` )) as unknown as ClickHouse.ObjectQueryResult return queryResult.data.map((event) => { return {