diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr index d9e0e5b8c2480..42444d841143c 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel.ambr @@ -183,7 +183,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT argMax(person.created_at, person.version) AS created_at, person.id AS id @@ -604,7 +605,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [1, 2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT argMax(person.created_at, person.version) AS created_at, person.id AS id @@ -723,7 +725,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT argMax(person.created_at, person.version) AS created_at, person.id AS id @@ -842,7 +845,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT argMax(person.created_at, person.version) AS created_at, person.id AS id diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation.ambr index 4d1ba34adce68..ca7be9b3d7ede 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlation.ambr @@ -431,7 +431,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -580,7 +581,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -729,7 +731,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -878,7 +881,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1190,7 +1194,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1339,7 +1344,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1488,7 +1494,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -1637,7 +1644,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -2178,7 +2186,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -2294,7 +2303,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -2410,7 +2420,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -2526,7 +2537,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -2791,7 +2803,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -2907,7 +2920,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3156,7 +3170,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3272,7 +3287,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'positively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3388,7 +3404,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3504,7 +3521,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3769,7 +3787,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -3885,7 +3904,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(funnel_actors.actor_id, event.`$group_0`) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2020-01-14 23:59:59', 6, 'UTC')))), notIn(event.event, ['paid', 'user signed up']), equals(event.event, 'negatively_related'), ifNull(notEquals(funnel_actors.steps, 2), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -4156,7 +4176,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -4279,7 +4300,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -4402,7 +4424,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -4525,7 +4548,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -4944,7 +4968,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5067,7 +5092,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5190,7 +5216,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5313,7 +5340,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5732,7 +5760,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5855,7 +5884,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -5978,7 +6008,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -6101,7 +6132,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -6520,7 +6552,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -6643,7 +6676,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -6766,7 +6800,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -6889,7 +6924,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -7308,7 +7344,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -7431,7 +7468,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -7554,7 +7592,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key @@ -7677,7 +7716,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT groups.group_type_index AS index, groups.group_key AS key diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlations_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlations_persons.ambr index 4f6c68ea6c6b9..c131eef69edee 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlations_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_correlations_persons.ambr @@ -111,7 +111,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(event__pdi.person_id, funnel_actors.actor_id) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed']), equals(event.event, 'insight loaded'), ifNull(equals(funnel_actors.steps, 2), 0)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -323,7 +324,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors ON equals(event__pdi.person_id, funnel_actors.actor_id) WHERE and(equals(event.team_id, 2), greaterOrEquals(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-01 00:00:00', 6, 'UTC'))), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC'))), equals(event.team_id, 2), greater(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), funnel_actors.first_timestamp), less(toTimeZone(toDateTime(toTimeZone(event.timestamp, 'UTC'), 'UTC'), 'UTC'), coalesce(funnel_actors.final_timestamp, plus(toTimeZone(funnel_actors.first_timestamp, 'UTC'), toIntervalDay(14)), assumeNotNull(parseDateTime64BestEffortOrNull('2021-01-08 23:59:59', 6, 'UTC')))), notIn(event.event, ['$pageview', 'insight analyzed', 'insight updated']), equals(event.event, 'insight loaded'), ifNull(notEquals(funnel_actors.steps, 3), 1)) GROUP BY actor_id - ORDER BY actor_id ASC) AS source + ORDER BY actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -472,7 +474,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -621,7 +624,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(equals(funnel_actors.steps, 2), 0) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -770,7 +774,8 @@ ORDER BY aggregation_target ASC) AS funnel_actors WHERE ifNull(notEquals(funnel_actors.steps, 2), 1) GROUP BY funnel_actors.actor_id - ORDER BY funnel_actors.actor_id ASC) AS source + ORDER BY funnel_actors.actor_id ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons.ambr index 18bfe7e9fb732..41d74e60eb3d7 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_persons.ambr @@ -153,7 +153,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [1, 2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -341,7 +342,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -529,7 +531,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(equals(steps, 2), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr index 49b02ae1302e5..1845beb0323b1 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_strict_persons.ambr @@ -113,7 +113,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [1, 2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -261,7 +262,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(in(steps, [2, 3]), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -409,7 +411,8 @@ HAVING ifNull(equals(steps, max_steps), isNull(steps) and isNull(max_steps))) WHERE ifNull(equals(steps, 2), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person diff --git a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr index 07d851cf6d324..e24701e0ec0a0 100644 --- a/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr +++ b/posthog/hogql_queries/insights/funnels/test/__snapshots__/test_funnel_trends_persons.ambr @@ -139,7 +139,8 @@ GROUP BY aggregation_target, entrance_period_start) WHERE ifNull(greaterOrEquals(steps_completed, 2), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -313,7 +314,8 @@ GROUP BY aggregation_target, entrance_period_start) WHERE and(ifNull(greaterOrEquals(steps_completed, 1), 0), ifNull(less(steps_completed, 3), 0)) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person @@ -487,7 +489,8 @@ GROUP BY aggregation_target, entrance_period_start) WHERE ifNull(greaterOrEquals(steps_completed, 3), 0) - ORDER BY aggregation_target ASC) AS source + ORDER BY aggregation_target ASC SETTINGS use_query_cache=1, + query_cache_ttl=600) AS source INNER JOIN (SELECT person.id AS id FROM person