diff --git a/ee/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr b/ee/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr index d8d0967eb9896..41094c453fec8 100644 --- a/ee/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr +++ b/ee/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr @@ -50,7 +50,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT %(limit)s OFFSET %(offset)s @@ -107,7 +107,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT %(limit)s OFFSET %(offset)s @@ -163,7 +163,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT %(limit)s OFFSET %(offset)s @@ -219,7 +219,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT %(limit)s OFFSET %(offset)s @@ -249,7 +249,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -292,7 +292,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -322,7 +322,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -365,7 +365,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -395,7 +395,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -438,7 +438,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -468,7 +468,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -511,7 +511,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -541,7 +541,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -592,7 +592,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -622,7 +622,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -673,7 +673,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -703,7 +703,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -754,7 +754,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -784,7 +784,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -835,7 +835,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -865,7 +865,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -916,7 +916,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -946,7 +946,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -997,7 +997,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1027,7 +1027,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1078,7 +1078,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1108,7 +1108,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1159,7 +1159,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1204,7 +1204,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1249,7 +1249,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1294,7 +1294,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1339,7 +1339,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1384,7 +1384,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1429,7 +1429,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1474,7 +1474,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1519,7 +1519,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1562,7 +1562,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1605,7 +1605,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1648,7 +1648,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1691,7 +1691,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 diff --git a/posthog/session_recordings/queries/session_recording_list_from_filters.py b/posthog/session_recordings/queries/session_recording_list_from_filters.py index fc0c3781946d5..f6b2652c9b2aa 100644 --- a/posthog/session_recordings/queries/session_recording_list_from_filters.py +++ b/posthog/session_recordings/queries/session_recording_list_from_filters.py @@ -252,7 +252,12 @@ def _where_predicates(self) -> ast.And: return ast.And(exprs=exprs) def _having_predicates(self) -> ast.And | Constant: - exprs: list[ast.Expr] = [] + exprs: list[ast.Expr] = [ + # a missing first url indicate delayed or incomplete ingestion and we can ignore those + ast.CompareOperation( + op=ast.CompareOperationOp.NotEq, left=ast.Field(chain=["first_url"]), right=ast.Constant(value=None) + ) + ] if self._filter.recording_duration_filter: op = ( diff --git a/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py b/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py index 78b204d872314..1e34d247a42d3 100644 --- a/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py +++ b/posthog/session_recordings/queries/session_recording_list_from_replay_summary.py @@ -642,7 +642,7 @@ def ttl_days(self): {provided_session_ids_clause} {log_matching_session_ids_clause} GROUP BY session_id - HAVING 1=1 {duration_clause} {console_log_clause} + HAVING s.first_url is not null {duration_clause} {console_log_clause} {order_by_clause} LIMIT %(limit)s OFFSET %(offset)s """ diff --git a/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_filters.ambr b/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_filters.ambr index d620633d8d16f..3dfc09ffd8e85 100644 --- a/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_filters.ambr +++ b/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_filters.ambr @@ -24,7 +24,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['custom-event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -61,7 +61,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['custom-event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -98,7 +98,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['custom-event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -135,7 +135,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['custom-event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -186,7 +186,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person_id, '00000000-0000-0000-0000-000000000000'), 0)))) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(duration, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(duration, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -223,7 +223,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -260,7 +260,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -297,7 +297,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -334,7 +334,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -371,7 +371,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -408,7 +408,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -440,7 +440,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -472,7 +472,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(duration, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(duration, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -504,7 +504,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(active_seconds, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(active_seconds, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -536,7 +536,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(inactive_seconds, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(inactive_seconds, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -568,7 +568,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY active_seconds DESC LIMIT 4 OFFSET 0 SETTINGS readonly=2, @@ -600,7 +600,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY console_error_count DESC LIMIT 4 OFFSET 0 SETTINGS readonly=2, @@ -632,7 +632,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 4 OFFSET 0 SETTINGS readonly=2, @@ -664,7 +664,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 2 OFFSET 0 SETTINGS readonly=2, @@ -696,7 +696,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 2 OFFSET 1 SETTINGS readonly=2, @@ -728,7 +728,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 2 OFFSET 2 SETTINGS readonly=2, @@ -760,7 +760,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -792,7 +792,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-30 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -824,7 +824,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 12:46:00.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-12 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 12:46:00.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -856,7 +856,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 12:46:00.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 12:46:00.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -888,7 +888,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 12:46:00.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-10 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 12:46:00.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -920,7 +920,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-28 23:59:59.999999', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -952,7 +952,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-29 23:59:59.999999', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -984,7 +984,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(duration, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(duration, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1016,7 +1016,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING ifNull(lessOrEquals(duration, 60), 0) + HAVING and(isNotNull(first_url), ifNull(lessOrEquals(duration, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1053,7 +1053,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1090,7 +1090,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$autocapture'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1127,7 +1127,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1159,7 +1159,7 @@ FROM session_replay_events AS s WHERE and(equals(s.team_id, 2), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-11 13:46:23.000000', 6, 'UTC')), 0), ifNull(greaterOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2020-12-25 00:00:00.000000', 6, 'UTC')), 0), ifNull(lessOrEquals(toTimeZone(s.min_first_timestamp, 'UTC'), toDateTime64('2021-01-01 13:46:23.000000', 6, 'UTC')), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1196,7 +1196,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(duration, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(duration, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1233,7 +1233,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING ifNull(greaterOrEquals(active_seconds, 60), 0) + HAVING and(isNotNull(first_url), ifNull(greaterOrEquals(active_seconds, 60), 0)) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1275,7 +1275,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1312,7 +1312,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1366,7 +1366,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1420,7 +1420,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1457,7 +1457,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1511,7 +1511,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1565,7 +1565,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1617,7 +1617,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1669,7 +1669,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1706,7 +1706,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1743,7 +1743,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1780,7 +1780,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1817,7 +1817,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1854,7 +1854,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1891,7 +1891,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$autocapture'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1928,7 +1928,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -1965,7 +1965,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2002,7 +2002,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['a_different_event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2039,7 +2039,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['a_different_event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2076,7 +2076,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2113,7 +2113,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2150,7 +2150,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['a_different_event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2187,7 +2187,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['a_different_event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2241,7 +2241,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(notILike(person_distinct_ids__person.properties___email, '%@posthog.com%'), 1)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2278,7 +2278,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2332,7 +2332,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(notILike(person_distinct_ids__person.properties___email, '%@posthog.com%'), 1)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2369,7 +2369,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2406,7 +2406,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageleave', '$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2444,7 +2444,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE and(ifNull(in(console_logs_log_entries.level, ['warn', 'error']), 0), ifNull(greater(positionCaseInsensitive(console_logs_log_entries.message, 'message 4'), 0), 0))))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2482,7 +2482,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE and(ifNull(in(console_logs_log_entries.level, ['warn', 'error']), 0), ifNull(greater(positionCaseInsensitive(console_logs_log_entries.message, 'message 5'), 0), 0))))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2520,7 +2520,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE and(ifNull(in(console_logs_log_entries.level, ['warn', 'error']), 0), ifNull(greater(positionCaseInsensitive(console_logs_log_entries.message, 'MESSAGE 5'), 0), 0))))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2558,7 +2558,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE and(ifNull(in(console_logs_log_entries.level, ['info']), 0), ifNull(greater(positionCaseInsensitive(console_logs_log_entries.message, 'message 5'), 0), 0))))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2596,7 +2596,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['error']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2634,7 +2634,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['info']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2672,7 +2672,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['info']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2710,7 +2710,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['warn']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2748,7 +2748,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['warn']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2786,7 +2786,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['info']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2824,7 +2824,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['warn', 'error']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2862,7 +2862,7 @@ WHERE and(equals(log_entries.team_id, 2), equals(log_entries.log_source, 'session_replay'))) AS console_logs_log_entries WHERE ifNull(in(console_logs_log_entries.level, ['info']), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2899,7 +2899,7 @@ in(s.session_id, ['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001' /* ... */]) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2936,7 +2936,7 @@ in(s.session_id, ['00000000-0000-0000-0000-000000000000', '00000000-0000-0000-0000-000000000001' /* ... */]) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -2998,7 +2998,7 @@ FROM cohortpeople WHERE and(equals(cohortpeople.team_id, 2), equals(cohortpeople.cohort_id, 2), equals(cohortpeople.version, 0)))), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3065,7 +3065,7 @@ FROM cohortpeople WHERE and(equals(cohortpeople.team_id, 2), equals(cohortpeople.cohort_id, 2), equals(cohortpeople.version, 0)))), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3112,7 +3112,7 @@ FROM cohortpeople WHERE and(equals(cohortpeople.team_id, 2), equals(cohortpeople.cohort_id, 2), equals(cohortpeople.version, 0)))), 0)) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3161,7 +3161,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla@gmail.com'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3210,7 +3210,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(notILike(person_distinct_ids__person.properties___email, '%gmail.com%'), 1)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3247,7 +3247,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview', 'new-event'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3284,7 +3284,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview', 'new-event2'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3330,7 +3330,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person_id, '00000000-0000-0000-0000-000000000000'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3367,7 +3367,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3404,7 +3404,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3441,7 +3441,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3478,7 +3478,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3515,7 +3515,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3552,7 +3552,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3589,7 +3589,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3626,7 +3626,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3663,7 +3663,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3700,7 +3700,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3737,7 +3737,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3774,7 +3774,7 @@ GROUP BY events.`$session_id` HAVING true))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3811,7 +3811,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3860,7 +3860,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3897,7 +3897,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3946,7 +3946,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -3983,7 +3983,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -4032,7 +4032,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -4069,7 +4069,7 @@ GROUP BY events.`$session_id` HAVING hasAll(groupUniqArray(events.event), ['$pageview'])))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, @@ -4118,7 +4118,7 @@ HAVING and(ifNull(equals(argMax(person.is_deleted, person.version), 0), 0), ifNull(less(argMax(person.created_at, person.version), plus(now64(6, 'UTC'), toIntervalDay(1))), 0)))), 0)) SETTINGS optimize_aggregation_in_order=1) AS person_distinct_ids__person ON equals(person_distinct_ids.person_distinct_ids___person_id, person_distinct_ids__person.id) WHERE ifNull(equals(person_distinct_ids__person.properties___email, 'bla'), 0)))) GROUP BY s.session_id - HAVING true + HAVING isNotNull(first_url) ORDER BY start_time DESC LIMIT 51 OFFSET 0 SETTINGS readonly=2, diff --git a/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr b/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr index 45277b504d4b8..58c6d9940430b 100644 --- a/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr +++ b/posthog/session_recordings/queries/test/__snapshots__/test_session_recording_list_from_session_replay.ambr @@ -41,7 +41,7 @@ HAVING 1=1 AND hasAll(event_names, ['custom-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -88,7 +88,7 @@ HAVING 1=1 AND hasAll(event_names, ['custom-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -136,7 +136,7 @@ HAVING 1=1 AND hasAll(event_names, ['custom-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -184,7 +184,7 @@ HAVING 1=1 AND hasAll(event_names, ['custom-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -260,7 +260,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview', 'custom-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND duration > 60 ORDER BY start_time DESC LIMIT 51 @@ -304,7 +304,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -348,7 +348,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -392,7 +392,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -435,7 +435,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -479,7 +479,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -523,7 +523,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -553,7 +553,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -583,7 +583,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND duration > 60 ORDER BY start_time DESC LIMIT 51 @@ -614,7 +614,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND active_seconds > 60 ORDER BY start_time DESC LIMIT 51 @@ -645,7 +645,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND inactive_seconds > 60 ORDER BY start_time DESC LIMIT 51 @@ -676,7 +676,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY active_seconds DESC LIMIT 4 OFFSET 0 @@ -706,7 +706,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY console_error_count DESC LIMIT 4 OFFSET 0 @@ -736,7 +736,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 4 OFFSET 0 @@ -766,7 +766,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 2 OFFSET 0 @@ -796,7 +796,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 2 OFFSET 1 @@ -826,7 +826,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 2 OFFSET 2 @@ -856,7 +856,7 @@ AND s.min_first_timestamp >= '2021-01-01 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -886,7 +886,7 @@ AND s.min_first_timestamp >= '2020-12-30 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -916,7 +916,7 @@ AND s.min_first_timestamp >= '2020-12-12 00:00:00' AND s.min_first_timestamp <= '2021-01-01 12:46:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -946,7 +946,7 @@ AND s.min_first_timestamp >= '2020-12-11 00:00:00' AND s.min_first_timestamp <= '2021-01-01 12:46:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -976,7 +976,7 @@ AND s.min_first_timestamp >= '2020-12-10 00:00:00' AND s.min_first_timestamp <= '2021-01-01 12:46:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1006,7 +1006,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2020-12-28 23:59:59' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1036,7 +1036,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2020-12-29 23:59:59' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1066,7 +1066,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND duration > 60 ORDER BY start_time DESC LIMIT 51 @@ -1097,7 +1097,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND duration < 60 ORDER BY start_time DESC LIMIT 51 @@ -1143,7 +1143,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1188,7 +1188,7 @@ HAVING 1=1 AND hasAll(event_names, ['$autocapture'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1233,7 +1233,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1263,7 +1263,7 @@ AND s.min_first_timestamp >= '2020-12-25 00:00:00' AND s.min_first_timestamp <= '2021-01-01 13:46:23' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1308,7 +1308,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND duration > 60 ORDER BY start_time DESC LIMIT 51 @@ -1354,7 +1354,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND active_seconds > 60 ORDER BY start_time DESC LIMIT 51 @@ -1408,7 +1408,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1453,7 +1453,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1534,7 +1534,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1613,7 +1613,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1658,7 +1658,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1737,7 +1737,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1814,7 +1814,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1892,7 +1892,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -1970,7 +1970,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2016,7 +2016,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2062,7 +2062,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2108,7 +2108,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2154,7 +2154,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2199,7 +2199,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2244,7 +2244,7 @@ HAVING 1=1 AND hasAll(event_names, ['$autocapture'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2290,7 +2290,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2336,7 +2336,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2382,7 +2382,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2428,7 +2428,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2517,7 +2517,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2562,7 +2562,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2651,7 +2651,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2696,7 +2696,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2742,7 +2742,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview', '$pageleave'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -2782,7 +2782,7 @@ AND level in ['warn', 'error'] AND positionCaseInsensitive(message, 'message 4') > 0 ) as log_text_matching GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0 OR console_error_count > 0) ORDER BY start_time DESC @@ -2824,7 +2824,7 @@ AND level in ['warn', 'error'] AND positionCaseInsensitive(message, 'message 5') > 0 ) as log_text_matching GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0 OR console_error_count > 0) ORDER BY start_time DESC @@ -2866,7 +2866,7 @@ AND level in ['warn', 'error'] AND positionCaseInsensitive(message, 'MESSAGE 5') > 0 ) as log_text_matching GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0 OR console_error_count > 0) ORDER BY start_time DESC @@ -2908,7 +2908,7 @@ AND level in ['info'] AND positionCaseInsensitive(message, 'message 5') > 0 ) as log_text_matching GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_log_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -2939,7 +2939,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_error_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -2970,7 +2970,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_log_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3001,7 +3001,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_log_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3032,7 +3032,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3063,7 +3063,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3094,7 +3094,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_log_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3125,7 +3125,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_warn_count > 0 OR console_error_count > 0) ORDER BY start_time DESC @@ -3157,7 +3157,7 @@ AND s.min_first_timestamp >= '2021-01-14 00:00:00' AND s.min_first_timestamp <= '2021-01-21 20:00:00' GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null AND (console_log_count > 0) ORDER BY start_time DESC LIMIT 51 @@ -3229,7 +3229,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3336,7 +3336,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3423,7 +3423,7 @@ HAVING 1=1 AND hasAll(event_names, ['custom_event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3474,7 +3474,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3525,7 +3525,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3571,7 +3571,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview', 'new-event'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3617,7 +3617,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview', 'new-event2'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3662,7 +3662,7 @@ HAVING argMax(is_deleted, version) = 0 AND current_person_id = '00000000-0000-0000-0000-000000000000') as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3707,7 +3707,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3750,7 +3750,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3795,7 +3795,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3838,7 +3838,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3883,7 +3883,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3926,7 +3926,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -3971,7 +3971,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4014,7 +4014,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4059,7 +4059,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4102,7 +4102,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4147,7 +4147,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4190,7 +4190,7 @@ GROUP BY `$session_id` HAVING 1=1) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4235,7 +4235,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4283,7 +4283,7 @@ HAVING argMax(is_deleted, version) = 0 AND (ifNull(equals(replaceRegexpAll(nullIf(nullIf(JSONExtractRaw(person_props, 'email'), ''), 'null'), '^"|"$', ''), 'bla'), 0))) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4328,7 +4328,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4375,7 +4375,7 @@ HAVING argMax(is_deleted, version) = 0 AND (ifNull(equals(nullIf(nullIf(pmat_email, ''), 'null'), 'bla'), 0))) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4420,7 +4420,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4471,7 +4471,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4516,7 +4516,7 @@ HAVING 1=1 AND hasAll(event_names, ['$pageview'])) as session_events_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 @@ -4567,7 +4567,7 @@ GROUP BY distinct_id HAVING argMax(is_deleted, version) = 0) as session_persons_sub_query) GROUP BY session_id - HAVING 1=1 + HAVING s.first_url is not null ORDER BY start_time DESC LIMIT 51 OFFSET 0 diff --git a/posthog/session_recordings/queries/test/session_replay_sql.py b/posthog/session_recordings/queries/test/session_replay_sql.py index d2d0edb16c35a..8be7d3b88b1da 100644 --- a/posthog/session_recordings/queries/test/session_replay_sql.py +++ b/posthog/session_recordings/queries/test/session_replay_sql.py @@ -105,7 +105,7 @@ def produce_replay_summary( distinct_id: Optional[str] = None, first_timestamp: Optional[str | datetime] = None, last_timestamp: Optional[str | datetime] = None, - first_url: Optional[str | None] = None, + first_url: Optional[str | None] = "https://not-provided-by-test.com", click_count: Optional[int] = None, keypress_count: Optional[int] = None, mouse_activity_count: Optional[int] = None, diff --git a/posthog/session_recordings/queries/test/test_session_recording_list_from_filters.py b/posthog/session_recordings/queries/test/test_session_recording_list_from_filters.py index 9f09d82f8f034..2cc1aa2e4fae4 100644 --- a/posthog/session_recordings/queries/test/test_session_recording_list_from_filters.py +++ b/posthog/session_recordings/queries/test/test_session_recording_list_from_filters.py @@ -132,7 +132,7 @@ def test_basic_query(self): first_timestamp=(self.an_hour_ago + relativedelta(seconds=20)), last_timestamp=(self.an_hour_ago + relativedelta(seconds=2000)), distinct_id=user, - first_url=None, + first_url="https://another-url.com", click_count=2, keypress_count=2, mouse_activity_count=2, @@ -154,7 +154,7 @@ def test_basic_query(self): "inactive_seconds": 1188.0, "start_time": self.an_hour_ago + relativedelta(seconds=20), "end_time": self.an_hour_ago + relativedelta(seconds=2000), - "first_url": None, + "first_url": "https://another-url.com", "console_log_count": 0, "console_warn_count": 0, "console_error_count": 0, @@ -313,7 +313,7 @@ def test_basic_query_with_paging(self): first_timestamp=(self.an_hour_ago + relativedelta(seconds=20)), last_timestamp=(self.an_hour_ago + relativedelta(seconds=2000)), distinct_id=user, - first_url=None, + first_url="https://another-url.com", click_count=2, keypress_count=2, mouse_activity_count=2, @@ -337,7 +337,7 @@ def test_basic_query_with_paging(self): "inactive_seconds": 1188.0, "start_time": self.an_hour_ago + relativedelta(seconds=20), "end_time": self.an_hour_ago + relativedelta(seconds=2000), - "first_url": None, + "first_url": "https://another-url.com", "console_log_count": 0, "console_warn_count": 0, "console_error_count": 0, @@ -563,17 +563,17 @@ def test_first_url_selection(self): "session_id": session_id_two, "first_url": "https://first-is-on-second-event.com", }, - { - "session_id": session_id_three, - "first_url": None, - }, + # sessions without urls are not included + # { + # "session_id": session_id_three, + # "first_url": None, + # }, { "session_id": session_id_four, "first_url": "https://on-second-received-event-but-actually-first.com", }, ], - # mypy unhappy about this lambda 🤷️ - key=lambda x: x["session_id"], # type: ignore + key=lambda x: x["session_id"], ) def test_recordings_dont_leak_data_between_teams(self): @@ -591,7 +591,6 @@ def test_recordings_dont_leak_data_between_teams(self): distinct_id=user, first_timestamp=self.an_hour_ago, last_timestamp=self.an_hour_ago + relativedelta(seconds=20), - first_url=None, click_count=2, keypress_count=2, mouse_activity_count=2, @@ -604,7 +603,6 @@ def test_recordings_dont_leak_data_between_teams(self): distinct_id=user, first_timestamp=self.an_hour_ago, last_timestamp=self.an_hour_ago + relativedelta(seconds=20), - first_url=None, click_count=2, keypress_count=2, mouse_activity_count=2, @@ -1230,6 +1228,7 @@ def test_all_sessions_recording_object_keys_with_entity_filter(self): first_timestamp=self.an_hour_ago, last_timestamp=(self.an_hour_ago + relativedelta(seconds=60)), team_id=self.team.id, + first_url="https://recieved-out-of-order.com/second", ) self.create_event( user, @@ -1242,6 +1241,7 @@ def test_all_sessions_recording_object_keys_with_entity_filter(self): first_timestamp=self.an_hour_ago, last_timestamp=(self.an_hour_ago + relativedelta(seconds=30)), team_id=self.team.id, + first_url="https://recieved-out-of-order.com/first", ) (session_recordings, _, _) = self._filter_recordings_by( @@ -1266,7 +1266,7 @@ def test_all_sessions_recording_object_keys_with_entity_filter(self): "end_time": self.an_hour_ago + relativedelta(seconds=60), "active_seconds": 0.0, "click_count": 0, - "first_url": None, + "first_url": "https://recieved-out-of-order.com/first", "inactive_seconds": 60.0, "keypress_count": 0, "mouse_activity_count": 0, diff --git a/posthog/session_recordings/queries/test/test_session_recording_list_from_session_replay.py b/posthog/session_recordings/queries/test/test_session_recording_list_from_session_replay.py index 7bfbd6fcb3f67..09b1c68cfe122 100644 --- a/posthog/session_recordings/queries/test/test_session_recording_list_from_session_replay.py +++ b/posthog/session_recordings/queries/test/test_session_recording_list_from_session_replay.py @@ -1151,7 +1151,7 @@ def test_all_sessions_recording_object_keys_with_entity_filter(self): "end_time": self.an_hour_ago + relativedelta(seconds=60), "active_seconds": 0.0, "click_count": 0, - "first_url": None, + "first_url": "https://not-provided-by-test.com", "inactive_seconds": 60.0, "keypress_count": 0, "mouse_activity_count": 0, diff --git a/posthog/session_recordings/test/test_session_recordings.py b/posthog/session_recordings/test/test_session_recordings.py index 401eaa01365ed..eee3c288c3be9 100644 --- a/posthog/session_recordings/test/test_session_recordings.py +++ b/posthog/session_recordings/test/test_session_recordings.py @@ -254,7 +254,7 @@ def test_session_recordings_dont_leak_teams(self) -> None: "recording_duration": ANY, "snapshot_source": "web", "start_time": ANY, - "start_url": None, + "start_url": "https://not-provided-by-test.com", "storage": "object_storage", "viewed": False, }, @@ -399,7 +399,7 @@ def test_get_single_session_recording_metadata(self): "end_time": (base_time + relativedelta(seconds=30)).strftime("%Y-%m-%dT%H:%M:%SZ"), "click_count": 0, "keypress_count": 0, - "start_url": None, + "start_url": "https://not-provided-by-test.com", "mouse_activity_count": 0, "inactive_seconds": 30, "active_seconds": 0,