:hedgehog: PostHog is the leading platform for building self-driving products. Our developer tools – AI observability, analytics, session replay, flags, experiments, error tracking, logs, and more – capture all the context agents need to diagnose problems, uncover opportunities, and ship fixes. Steer it all from Slack, web, desktop, or the MCP.
Python ab-testingai-analyticsanalyticscdpdata-warehouseexperimentsfeature-flagsjavascriptproduct-analyticspythonreactsession-replaysurveystypescriptweb-analytics
fix(hogql): keep datetime item type on array join aliases (#119332)
posthog[bot]abbc794123b9
diff --git a/posthog/hogql/ast.py b/posthog/hogql/ast.pyindex 8eb82b4f6191..45f0355e9bf4 100644--- a/posthog/hogql/ast.py+++ b/posthog/hogql/ast.py@@ -212,6 +212,19 @@ class FieldAliasType(Type):raise NotImplementedError("FieldAliasType.resolve_table_type not implemented")+@dataclass(kw_only=True, slots=True, frozen=False)+class ArrayJoinAliasType(FieldAliasType):+ """An ARRAY JOIN alias holds one item of its array expression, not the whole array."""++ def resolve_constant_type(self, context: HogQLContext) -> ConstantType:+ constant_type = self.type.resolve_constant_type(context)+ if isinstance(constant_type, ArrayType):+ return constant_type.item_type+ if isinstance(constant_type, StringArrayType):+ return StringType(nullable=False)+ return UnknownType()++@dataclass(kw_only=True, slots=True, frozen=False)class BaseTableType(Type):def resolve_database_table(self, context: HogQLContext) -> Table:diff --git a/posthog/hogql/printer/base.py b/posthog/hogql/printer/base.pyindex b796aedf340d..44be235b7668 100644--- a/posthog/hogql/printer/base.py+++ b/posthog/hogql/printer/base.py@@ -1386,6 +1386,9 @@ class BasePrinter(Visitor[str]):def visit_field_alias_type(self, type: ast.FieldAliasType):return self._print_identifier(type.alias)+ def visit_array_join_alias_type(self, type: ast.ArrayJoinAliasType):+ return self.visit_field_alias_type(type)+def visit_expression_field_type(self, type: ast.ExpressionFieldType):return self.visit(type.expr)diff --git a/posthog/hogql/printer/clickhouse.py b/posthog/hogql/printer/clickhouse.pyindex bac1a486acdd..93a312db3bed 100644--- a/posthog/hogql/printer/clickhouse.py+++ b/posthog/hogql/printer/clickhouse.py@@ -48,7 +48,7 @@ from posthog.hogql.restricted_properties import (restricted_feature_flag_names,restricted_property_keys_for_table_type,)-from posthog.hogql.type_system import parse_sql_runtime_type+from posthog.hogql.type_system import infer_tuple_access_constant_type, parse_sql_runtime_typefrom posthog.hogql.visitor import GetFieldsTraverser, clone_exprfrom posthog.clickhouse.client.escape import substitute_params@@ -302,10 +302,20 @@ class ClickHousePrinter(BasePrinter):first_arg is not Noneand first_arg.type is not Noneand (- first_arg_was_alias or isinstance(first_arg, ast.Call) or isinstance(first_arg.type, ast.FieldType)+ first_arg_was_alias+ or isinstance(first_arg, ast.Call)+ or isinstance(first_arg.type, (ast.FieldType, ast.FieldAliasType)))):first_arg_constant_type = first_arg.type.resolve_constant_type(self.context)+ elif (+ isinstance(first_arg, ast.TupleAccess)+ and isinstance(first_arg.tuple, ast.Field)+ and isinstance(first_arg.tuple.type, ast.FieldAliasType)+ ):+ first_arg_constant_type = infer_tuple_access_constant_type(+ first_arg.tuple.type.resolve_constant_type(self.context), first_arg.index+ )elif isinstance(node.type, ast.CallType) and len(node.type.arg_types) > 0:first_arg_constant_type = node.type.arg_types[0]diff --git a/posthog/hogql/printer/test/test_printer.py b/posthog/hogql/printer/test/test_printer.pyindex 7df9c7ee0125..bf8eec167e0b 100644--- a/posthog/hogql/printer/test/test_printer.py+++ b/posthog/hogql/printer/test/test_printer.py@@ -3297,6 +3297,44 @@ class TestPrinter(BaseTest):assert "parseDateTime64BestEffort" not in printed, printedassert printed.startswith(expected_prefix), printed+ @parameterized.expand(+ [+ (+ "aggregated_array",+ "SELECT toDate(d) AS day FROM (SELECT groupArrayIf(timestamp, event = 'a') AS ds FROM events) ARRAY JOIN ds AS d",+ "toDate(d)",+ ),+ (+ "nullable_items",+ "SELECT toDate(d) AS day FROM (SELECT [toDateTime('2026-10-18 12:00:00'), NULL] AS ds) ARRAY JOIN ds AS d",+ "toDate(d)",+ ),+ (+ "where_clause",+ "SELECT 1 FROM (SELECT groupArray(timestamp) AS ds FROM events) ARRAY JOIN ds AS d WHERE toDate(d) = today()",+ "toDate(d)",+ ),+ (+ "tuple_item",+ "SELECT toDate(p.2) AS day FROM (SELECT groupArray((event, timestamp)) AS ps FROM events) ARRAY JOIN ps AS p",+ "toDate(p.2)",+ ),+ (+ "tuple_lambda",+ "SELECT arrayMap((e, t) -> toDate(t), groupArray(event), groupArray(timestamp)) AS days FROM events",+ "toDate(t)",+ ),+ (+ "string_items",+ "SELECT toDate(d) AS day FROM (SELECT groupArray(toString(timestamp)) AS ds FROM events) ARRAY JOIN ds AS d",+ "toDateOrNull(d)",+ ),+ ]+ )+ def test_date_conversion_of_an_array_join_item_uses_the_item_type(self, _name: str, query: str, expected: str):+ printed = self._select(query)+ assert expected in printed, printed+def test_window_functions(self):self.assertEqual(self._select(diff --git a/posthog/hogql/resolver.py b/posthog/hogql/resolver.pyindex 04c7c9ea07d2..67e48f91be4b 100644--- a/posthog/hogql/resolver.py+++ b/posthog/hogql/resolver.py@@ -1014,6 +1014,7 @@ class Resolver(CloningVisitor):new_node.array_join_op = node.array_join_opac = AliasCollector()array_join_aliases = []+ array_join_placeholders: dict[str, ast.FieldAliasType] = {}if node.array_join_list:for expr in node.array_join_list:ac.visit(expr)@@ -1021,7 +1022,8 @@ class Resolver(CloningVisitor):for key in array_join_aliases:if key in node_type.aliases:raise QueryError(f"Cannot redefine an alias with the name: {key}")- node_type.aliases[key] = ast.FieldAliasType(alias=key, type=ast.UnknownType())+ array_join_placeholders[key] = ast.FieldAliasType(alias=key, type=ast.UnknownType())+ node_type.aliases[key] = array_join_placeholders[key]# Visit all the "SELECT a,b,c" columns. Mark each for export in "columns".select_nodes = []@@ -1119,6 +1121,17 @@ class Resolver(CloningVisitor):# delete the keys we added in the first pass to avoid "can't redefine" errorsdel node_type.aliases[key]new_node.array_join_list = [self.visit(expr) for expr in node.array_join_list]+ for array_join_expr in new_node.array_join_list:+ if isinstance(array_join_expr, ast.Alias) and isinstance(array_join_expr.type, ast.FieldAliasType):+ array_join_expr.type = ast.ArrayJoinAliasType(+ alias=array_join_expr.alias, type=array_join_expr.type.type+ )+ if not array_join_expr.hidden:+ node_type.aliases[array_join_expr.alias] = array_join_expr.type+ # SELECT columns resolved against the pass 1 placeholder, so give it the item type.+ placeholder = array_join_placeholders.get(array_join_expr.alias)+ if placeholder is not None:+ placeholder.type = array_join_expr.type.resolve_constant_type(self.context)# :TRICKY: Make sure to clone and visit _all_ SelectQuery nodes.new_node.where = self.visit(node.where)diff --git a/posthog/hogql/visitor.py b/posthog/hogql/visitor.pyindex 88631e699a62..3a03ea2d7655 100644--- a/posthog/hogql/visitor.py+++ b/posthog/hogql/visitor.py@@ -274,6 +274,9 @@ class TraversingVisitor(Visitor[None]):def visit_field_alias_type(self, node: ast.FieldAliasType):self.visit(node.type)+ def visit_array_join_alias_type(self, node: ast.ArrayJoinAliasType):+ self.visit_field_alias_type(node)+def visit_field_type(self, node: ast.FieldType):passdiff --git a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.ambr b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.ambrindex 6b4e9698de7f..8d781da9ea10 100644--- a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.ambr+++ b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.ambr@@ -33,7 +33,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -76,7 +76,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -119,7 +119,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -188,7 +188,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -257,7 +257,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -326,7 +326,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)diff --git a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.new_events_schema.ambr b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.new_events_schema.ambrindex f1ff12fe52af..c1e7b13feccd 100644--- a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.new_events_schema.ambr+++ b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_paths_query_runner.new_events_schema.ambr@@ -33,7 +33,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -76,7 +76,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -119,7 +119,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -188,7 +188,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -257,7 +257,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)@@ -326,7 +326,7 @@FROM per_conversion_pathWHERE ifNull(greater(per_conversion_path.orig_len, 0), 0)GROUP BY per_conversion_path.path), paths_footer AS (- SELECT sumIf(per_conversion_path.conversion_count, ifNull(equals(per_conversion_path.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion_path.conversion_count, equals(per_conversion_path.i, 1)) AS total_conversions, countIf(ifNull(greater(per_conversion_path.orig_len, 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion_path)SELECT path_rows.path AS path, path_rows.conversions AS conversions, path_rows.conversion_value AS conversion_value, path_rows.path_truncated AS path_truncated, paths_footer.total_conversions AS total_conversions, paths_footer.attributed_conversions AS attributed_conversions, path_rows.footer_key AS footer_keyFROM paths_footer LEFT JOIN path_rows ON equals(paths_footer.footer_key, path_rows.footer_key)diff --git a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.ambr b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.ambrindex f907551378d0..e1c6ee94d6d6 100644--- a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.ambr+++ b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.ambr@@ -53,7 +53,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_68)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -116,7 +116,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_186)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -179,7 +179,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_304)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -260,7 +260,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_40)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -341,7 +341,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_156)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -422,7 +422,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_158)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)diff --git a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.new_events_schema.ambr b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.new_events_schema.ambrindex 17ab77d24967..d3bf155c7c6f 100644--- a/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.new_events_schema.ambr+++ b/products/marketing_analytics/backend/hogql_queries/__snapshots__/test_attribution_table_query_runner.new_events_schema.ambr@@ -53,7 +53,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_66)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -116,7 +116,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_184)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -179,7 +179,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_302)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -260,7 +260,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_38)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -341,7 +341,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_154)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)@@ -422,7 +422,7 @@GROUP BY per_conversion_dim.breakdown_value), attribution_rows AS (SELECT coalesce(nullIf(attribution_totals.breakdown_value, %(hogql_val_156)s), influenced_reach.breakdown_value) AS breakdown_value, ifNull(influenced_reach.visitors, 0) AS visitors, ifNull(attribution_totals.influenced_conversions, 0) AS influenced_conversions, ifNull(attribution_totals.influenced_value, 0.0) AS influenced_value, ifNull(attribution_totals.w_first_conversions, 0.0) AS w_first_conversions, ifNull(attribution_totals.w_first_value, 0.0) AS w_first_value, ifNull(attribution_totals.w_last_conversions, 0.0) AS w_last_conversions, ifNull(attribution_totals.w_last_value, 0.0) AS w_last_value, ifNull(attribution_totals.w_linear_conversions, 0.0) AS w_linear_conversions, ifNull(attribution_totals.w_linear_value, 0.0) AS w_linear_value, ifNull(attribution_totals.w_decay_conversions, 0.0) AS w_decay_conversions, ifNull(attribution_totals.w_decay_value, 0.0) AS w_decay_value, ifNull(attribution_totals.w_position_conversions, 0.0) AS w_position_conversions, ifNull(attribution_totals.w_position_value, 0.0) AS w_position_value, 1 AS footer_keyFROM attribution_totals FULL OUTER JOIN influenced_reach ON equals(attribution_totals.breakdown_value, influenced_reach.breakdown_value)), attribution_footer AS (- SELECT sumIf(per_conversion.conversion_count, ifNull(equals(per_conversion.i, 1), 0)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_key+ SELECT sumIf(per_conversion.conversion_count, equals(per_conversion.i, 1)) AS total_conversions, countIf(ifNull(greater(length(per_conversion.tps), 0), 0)) AS attributed_conversions, 1 AS footer_keyFROM per_conversion)SELECT attribution_rows.breakdown_value AS breakdown_value, attribution_rows.visitors AS visitors, attribution_rows.influenced_conversions AS influenced_conversions, attribution_rows.influenced_value AS influenced_value, attribution_rows.w_first_conversions AS w_first_conversions, attribution_rows.w_first_value AS w_first_value, attribution_rows.w_last_conversions AS w_last_conversions, attribution_rows.w_last_value AS w_last_value, attribution_rows.w_linear_conversions AS w_linear_conversions, attribution_rows.w_linear_value AS w_linear_value, attribution_rows.w_decay_conversions AS w_decay_conversions, attribution_rows.w_decay_value AS w_decay_value, attribution_rows.w_position_conversions AS w_position_conversions, attribution_rows.w_position_value AS w_position_value, attribution_footer.total_conversions AS total_conversions, attribution_footer.attributed_conversions AS attributed_conversions, attribution_rows.footer_key AS footer_keyFROM attribution_footer LEFT JOIN attribution_rows ON equals(attribution_footer.footer_key, attribution_rows.footer_key)diff --git a/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.ambr b/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.ambrindex 410a5993cc6f..1cbceb1f9956 100644--- a/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.ambr+++ b/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.ambr@@ -15,7 +15,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -92,7 +92,7 @@groupArray(round(multiply(counts, divide(1, 0.1)))) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -166,7 +166,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -240,7 +240,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROMdiff --git a/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.new_events_schema.ambr b/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.new_events_schema.ambrindex 12a2ec8d9999..971a63f5e6b1 100644--- a/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.new_events_schema.ambr+++ b/products/product_analytics/backend/hogql_queries/lifecycle/test/__snapshots__/test_lifecycle_query_runner.new_events_schema.ambr@@ -5,7 +5,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -84,7 +84,7 @@groupArray(round(multiply(counts, divide(1, 0.1)))) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -160,7 +160,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROM@@ -236,7 +236,7 @@groupArray(counts) AS total,status AS statusFROM- (SELECT if(ifNull(equals(status, 'dormant'), 0), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,+ (SELECT if(equals(status, 'dormant'), negate(sum(counts)), negate(negate(sum(counts)))) AS counts,start_of_period AS start_of_period,status AS statusFROMdiff --git a/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.ambr b/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.ambrindex 398c875c45c2..8d97710768e8 100644--- a/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.ambr+++ b/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.ambr@@ -11,7 +11,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -99,7 +99,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -187,7 +187,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -274,7 +274,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -361,7 +361,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -448,7 +448,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -535,7 +535,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -622,7 +622,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -709,7 +709,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -796,7 +796,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -891,7 +891,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -986,7 +986,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -1083,7 +1083,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1204,7 +1204,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1325,7 +1325,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1446,7 +1446,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1567,7 +1567,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1688,7 +1688,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1809,7 +1809,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1930,7 +1930,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2051,7 +2051,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2179,7 +2179,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -2270,7 +2270,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2368,7 +2368,7 @@FROM(SELECT person_id AS actor_id, groupUniqArray(100)(tuple(timestamp, uuid, session_id, window_id)) AS matching_events, count(*) AS event_countFROM- (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_id+ (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_idFROM(SELECT person_id AS person_id, joined_path_tuple.1 AS path, joined_path_tuple.2 AS conversion_time, joined_path_tuple.3 AS prev_path, event_in_session_index, session_index AS session_index, arrayPopFront(arrayPushBack(path_basic, '')) AS path_basic_0, arrayMap((x, y) -> if(ifNull(equals(x, y), isNull(x)and isNull(y)), 0, 1), path_basic, path_basic_0) AS mapping, arrayFilter((x, y) -> y, time, mapping) AS timings, arrayFilter((x, y) -> y, path_basic, mapping) AS compact_path, indexOf(compact_path, NULL) AS target_index, joined_path_tuple.4 AS final_uuid, joined_path_tuple.5 AS final_timestamp, joined_path_tuple.6 AS final_session_id, joined_path_tuple.7 AS final_window_id, arrayFilter((x, y) -> y, uuid_items, mapping) AS uuid, arrayFilter((x, y) -> y, timestamp_items, mapping) AS timestamp, arrayFilter((x, y) -> y, session_id_items, mapping) AS session_id, arrayFilter((x, y) -> y, window_id_items, mapping) AS window_id, if(ifNull(greater(target_index, 0), 0), arraySlice(compact_path, target_index), compact_path) AS filtered_path, arraySlice(filtered_path, 1, 5) AS limited_path, if(ifNull(greater(target_index, 0), 0), arraySlice(timings, target_index), timings) AS filtered_timings, arraySlice(filtered_timings, 1, 5) AS limited_timings, if(ifNull(greater(target_index, 0), 0), arraySlice(uuid, target_index), uuid) AS filtered_uuid, arraySlice(filtered_uuid, 1, 5) AS limited_uuid, if(ifNull(greater(target_index, 0), 0), arraySlice(timestamp, target_index), timestamp) AS filtered_timestamp, arraySlice(filtered_timestamp, 1, 5) AS limited_timestamp, if(ifNull(greater(target_index, 0), 0), arraySlice(session_id, target_index), session_id) AS filtered_session_id, arraySlice(filtered_session_id, 1, 5) AS limited_session_id, if(ifNull(greater(target_index, 0), 0), arraySlice(window_id, target_index), window_id) AS filtered_window_id, arraySlice(filtered_window_id, 1, 5) AS limited_window_id, arrayDifference(limited_timings) AS timings_diff, concat(ifNull(toString(length(limited_path)), ''), '_', ifNull(toString(limited_path[-1]), '')) AS path_dropoff_key, arrayZip(limited_path, timings_diff, arrayPopBack(arrayPushFront(limited_path, '')), limited_uuid, limited_timestamp, limited_session_id, limited_window_id) AS limited_path_timings@@ -2452,7 +2452,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2550,7 +2550,7 @@FROM(SELECT person_id AS actor_id, groupUniqArray(100)(tuple(timestamp, uuid, session_id, window_id)) AS matching_events, count(*) AS event_countFROM- (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_id+ (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_idFROM(SELECT person_id AS person_id, joined_path_tuple.1 AS path, joined_path_tuple.2 AS conversion_time, joined_path_tuple.3 AS prev_path, event_in_session_index, session_index AS session_index, arrayPopFront(arrayPushBack(path_basic, '')) AS path_basic_0, arrayMap((x, y) -> if(ifNull(equals(x, y), isNull(x)and isNull(y)), 0, 1), path_basic, path_basic_0) AS mapping, arrayFilter((x, y) -> y, time, mapping) AS timings, arrayFilter((x, y) -> y, path_basic, mapping) AS compact_path, indexOf(compact_path, NULL) AS target_index, joined_path_tuple.4 AS final_uuid, joined_path_tuple.5 AS final_timestamp, joined_path_tuple.6 AS final_session_id, joined_path_tuple.7 AS final_window_id, arrayFilter((x, y) -> y, uuid_items, mapping) AS uuid, arrayFilter((x, y) -> y, timestamp_items, mapping) AS timestamp, arrayFilter((x, y) -> y, session_id_items, mapping) AS session_id, arrayFilter((x, y) -> y, window_id_items, mapping) AS window_id, if(ifNull(greater(target_index, 0), 0), arraySlice(compact_path, target_index), compact_path) AS filtered_path, arraySlice(filtered_path, 1, 5) AS limited_path, if(ifNull(greater(target_index, 0), 0), arraySlice(timings, target_index), timings) AS filtered_timings, arraySlice(filtered_timings, 1, 5) AS limited_timings, if(ifNull(greater(target_index, 0), 0), arraySlice(uuid, target_index), uuid) AS filtered_uuid, arraySlice(filtered_uuid, 1, 5) AS limited_uuid, if(ifNull(greater(target_index, 0), 0), arraySlice(timestamp, target_index), timestamp) AS filtered_timestamp, arraySlice(filtered_timestamp, 1, 5) AS limited_timestamp, if(ifNull(greater(target_index, 0), 0), arraySlice(session_id, target_index), session_id) AS filtered_session_id, arraySlice(filtered_session_id, 1, 5) AS limited_session_id, if(ifNull(greater(target_index, 0), 0), arraySlice(window_id, target_index), window_id) AS filtered_window_id, arraySlice(filtered_window_id, 1, 5) AS limited_window_id, arrayDifference(limited_timings) AS timings_diff, concat(ifNull(toString(length(limited_path)), ''), '_', ifNull(toString(limited_path[-1]), '')) AS path_dropoff_key, arrayZip(limited_path, timings_diff, arrayPopBack(arrayPushFront(limited_path, '')), limited_uuid, limited_timestamp, limited_session_id, limited_window_id) AS limited_path_timings@@ -2610,7 +2610,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2708,7 +2708,7 @@FROM(SELECT person_id AS actor_id, groupUniqArray(100)(tuple(timestamp, uuid, session_id, window_id)) AS matching_events, count(*) AS event_countFROM- (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_id+ (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_idFROM(SELECT person_id AS person_id, joined_path_tuple.1 AS path, joined_path_tuple.2 AS conversion_time, joined_path_tuple.3 AS prev_path, event_in_session_index, session_index AS session_index, arrayPopFront(arrayPushBack(path_basic, '')) AS path_basic_0, arrayMap((x, y) -> if(ifNull(equals(x, y), isNull(x)and isNull(y)), 0, 1), path_basic, path_basic_0) AS mapping, arrayFilter((x, y) -> y, time, mapping) AS timings, arrayFilter((x, y) -> y, path_basic, mapping) AS compact_path, indexOf(compact_path, NULL) AS target_index, joined_path_tuple.4 AS final_uuid, joined_path_tuple.5 AS final_timestamp, joined_path_tuple.6 AS final_session_id, joined_path_tuple.7 AS final_window_id, arrayFilter((x, y) -> y, uuid_items, mapping) AS uuid, arrayFilter((x, y) -> y, timestamp_items, mapping) AS timestamp, arrayFilter((x, y) -> y, session_id_items, mapping) AS session_id, arrayFilter((x, y) -> y, window_id_items, mapping) AS window_id, if(ifNull(greater(target_index, 0), 0), arraySlice(compact_path, target_index), compact_path) AS filtered_path, arraySlice(filtered_path, 1, 5) AS limited_path, if(ifNull(greater(target_index, 0), 0), arraySlice(timings, target_index), timings) AS filtered_timings, arraySlice(filtered_timings, 1, 5) AS limited_timings, if(ifNull(greater(target_index, 0), 0), arraySlice(uuid, target_index), uuid) AS filtered_uuid, arraySlice(filtered_uuid, 1, 5) AS limited_uuid, if(ifNull(greater(target_index, 0), 0), arraySlice(timestamp, target_index), timestamp) AS filtered_timestamp, arraySlice(filtered_timestamp, 1, 5) AS limited_timestamp, if(ifNull(greater(target_index, 0), 0), arraySlice(session_id, target_index), session_id) AS filtered_session_id, arraySlice(filtered_session_id, 1, 5) AS limited_session_id, if(ifNull(greater(target_index, 0), 0), arraySlice(window_id, target_index), window_id) AS filtered_window_id, arraySlice(filtered_window_id, 1, 5) AS limited_window_id, arrayDifference(limited_timings) AS timings_diff, concat(ifNull(toString(length(limited_path)), ''), '_', ifNull(toString(limited_path[-1]), '')) AS path_dropoff_key, arrayZip(limited_path, timings_diff, arrayPopBack(arrayPushFront(limited_path, '')), limited_uuid, limited_timestamp, limited_session_id, limited_window_id) AS limited_path_timings@@ -2792,7 +2792,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2890,7 +2890,7 @@FROM(SELECT person_id AS actor_id, groupUniqArray(100)(tuple(timestamp, uuid, session_id, window_id)) AS matching_events, count(*) AS event_countFROM- (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_id+ (SELECT person_id AS person_id, path AS path, conversion_time AS conversion_time, event_in_session_index AS event_in_session_index, concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key, if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key, path_dropoff_key AS path_dropoff_key, final_uuid AS uuid, final_timestamp AS timestamp, final_session_id AS session_id, final_window_id AS window_idFROM(SELECT person_id AS person_id, joined_path_tuple.1 AS path, joined_path_tuple.2 AS conversion_time, joined_path_tuple.3 AS prev_path, event_in_session_index, session_index AS session_index, arrayPopFront(arrayPushBack(path_basic, '')) AS path_basic_0, arrayMap((x, y) -> if(ifNull(equals(x, y), isNull(x)and isNull(y)), 0, 1), path_basic, path_basic_0) AS mapping, arrayFilter((x, y) -> y, time, mapping) AS timings, arrayFilter((x, y) -> y, path_basic, mapping) AS compact_path, indexOf(compact_path, NULL) AS target_index, joined_path_tuple.4 AS final_uuid, joined_path_tuple.5 AS final_timestamp, joined_path_tuple.6 AS final_session_id, joined_path_tuple.7 AS final_window_id, arrayFilter((x, y) -> y, uuid_items, mapping) AS uuid, arrayFilter((x, y) -> y, timestamp_items, mapping) AS timestamp, arrayFilter((x, y) -> y, session_id_items, mapping) AS session_id, arrayFilter((x, y) -> y, window_id_items, mapping) AS window_id, if(ifNull(greater(target_index, 0), 0), arraySlice(compact_path, target_index), compact_path) AS filtered_path, arraySlice(filtered_path, 1, 5) AS limited_path, if(ifNull(greater(target_index, 0), 0), arraySlice(timings, target_index), timings) AS filtered_timings, arraySlice(filtered_timings, 1, 5) AS limited_timings, if(ifNull(greater(target_index, 0), 0), arraySlice(uuid, target_index), uuid) AS filtered_uuid, arraySlice(filtered_uuid, 1, 5) AS limited_uuid, if(ifNull(greater(target_index, 0), 0), arraySlice(timestamp, target_index), timestamp) AS filtered_timestamp, arraySlice(filtered_timestamp, 1, 5) AS limited_timestamp, if(ifNull(greater(target_index, 0), 0), arraySlice(session_id, target_index), session_id) AS filtered_session_id, arraySlice(filtered_session_id, 1, 5) AS limited_session_id, if(ifNull(greater(target_index, 0), 0), arraySlice(window_id, target_index), window_id) AS filtered_window_id, arraySlice(filtered_window_id, 1, 5) AS limited_window_id, arrayDifference(limited_timings) AS timings_diff, concat(ifNull(toString(length(limited_path)), ''), '_', ifNull(toString(limited_path[-1]), '')) AS path_dropoff_key, arrayZip(limited_path, timings_diff, arrayPopBack(arrayPushFront(limited_path, '')), limited_uuid, limited_timestamp, limited_session_id, limited_window_id) AS limited_path_timings@@ -2977,15 +2977,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3241,15 +3241,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3543,7 +3543,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -3630,7 +3630,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -3724,7 +3724,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -3852,7 +3852,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -3946,7 +3946,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4074,7 +4074,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4162,7 +4162,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4249,7 +4249,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4338,7 +4338,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4459,7 +4459,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4578,7 +4578,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4667,7 +4667,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4786,7 +4786,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4875,7 +4875,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4996,7 +4996,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5117,7 +5117,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5236,7 +5236,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5323,7 +5323,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,diff --git a/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.new_events_schema.ambr b/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.new_events_schema.ambrindex d6fd1a1494dd..720899a4ec5c 100644--- a/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.new_events_schema.ambr+++ b/products/product_analytics/backend/hogql_queries/paths/test/__snapshots__/test_paths_query_runner_ee.new_events_schema.ambr@@ -11,7 +11,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -101,7 +101,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -191,7 +191,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -280,7 +280,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -369,7 +369,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -458,7 +458,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -547,7 +547,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -636,7 +636,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -725,7 +725,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -814,7 +814,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -911,7 +911,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -1008,7 +1008,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -1107,7 +1107,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1230,7 +1230,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1353,7 +1353,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1476,7 +1476,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1599,7 +1599,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1722,7 +1722,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1845,7 +1845,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -1968,7 +1968,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2091,7 +2091,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -2212,7 +2212,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -2308,15 +2308,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -2512,15 +2512,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -2739,15 +2739,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -2944,15 +2944,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3172,15 +3172,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3377,15 +3377,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3605,15 +3605,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -3809,15 +3809,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -4036,15 +4036,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -4305,15 +4305,15 @@event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_',ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index,- 1), 0), concat(ifNull(toString(minus(event_in_session_index,- 1)), ''), '_',- ifNull(toString(prev_path), '')), NULL) AS last_path_key,- path_dropoff_key AS path_dropoff_key,- final_uuid AS uuid,- final_timestamp AS timestamp,- final_session_id AS session_id,- final_window_id AS window_id+ if(greater(event_in_session_index,+ 1), concat(ifNull(toString(minus(event_in_session_index,+ 1)), ''), '_',+ ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ path_dropoff_key AS path_dropoff_key,+ final_uuid AS uuid,+ final_timestamp AS timestamp,+ final_session_id AS session_id,+ final_window_id AS window_idFROM (SELECT person_id AS person_id,joined_path_tuple.1 AS path,@@ -4590,7 +4590,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4681,7 +4681,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -4811,7 +4811,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -4907,7 +4907,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5037,7 +5037,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5131,7 +5131,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5221,7 +5221,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5312,7 +5312,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5435,7 +5435,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5556,7 +5556,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5647,7 +5647,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5768,7 +5768,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -5859,7 +5859,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -5982,7 +5982,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -6105,7 +6105,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_key,final_uuid AS uuid,final_timestamp AS timestamp,@@ -6226,7 +6226,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -6315,7 +6315,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,@@ -6404,7 +6404,7 @@conversion_time AS conversion_time,event_in_session_index AS event_in_session_index,concat(ifNull(toString(event_in_session_index), ''), '_', ifNull(toString(path), '')) AS path_key,- if(ifNull(greater(event_in_session_index, 1), 0), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,+ if(greater(event_in_session_index, 1), concat(ifNull(toString(minus(event_in_session_index, 1)), ''), '_', ifNull(toString(prev_path), '')), NULL) AS last_path_key,path_dropoff_key AS path_dropoff_keyFROM(SELECT person_id AS person_id,