diff --git a/posthog/hogql_queries/web_analytics/overview_stats.py b/posthog/hogql_queries/web_analytics/overview_stats.py index e059ff33770ee..fa1fd74f2eaf7 100644 --- a/posthog/hogql_queries/web_analytics/overview_stats.py +++ b/posthog/hogql_queries/web_analytics/overview_stats.py @@ -17,9 +17,9 @@ class WebOverviewStatsQueryRunner(WebAnalyticsQueryRunner): def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: with self.timings.measure("date_expr"): # TODO use the date range, with a previous period, trends query does this so look at that for insp - start = parse_expr("today() - 14") - mid = parse_expr("today() - 7") - end = parse_expr("today()") + start = parse_expr("today() - 14", backend="cpp") + mid = parse_expr("today() - 7", backend="cpp") + end = parse_expr("today()", backend="cpp") with self.timings.measure("overview_stats_query"): overview_stats_query = parse_select( """ @@ -42,6 +42,7 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: """, timings=self.timings, placeholders={"start": start, "mid": mid, "end": end, "event_properties": self.event_properties()}, + backend="cpp", ) return overview_stats_query diff --git a/posthog/hogql_queries/web_analytics/stats_table.py b/posthog/hogql_queries/web_analytics/stats_table.py index e70cf4a115651..12e739413f2d1 100644 --- a/posthog/hogql_queries/web_analytics/stats_table.py +++ b/posthog/hogql_queries/web_analytics/stats_table.py @@ -27,6 +27,7 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: "session_having": self.session_having(), "breakdown_by": self.bounce_breakdown(), }, + backend="cpp", ) with self.timings.measure("counts_query"): counts_query = parse_select( @@ -36,6 +37,7 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: "counts_where": self.events_where(), "breakdown_by": self.counts_breakdown(), }, + backend="cpp", ) with self.timings.measure("top_pages_query"): top_sources_query = parse_select( @@ -60,6 +62,7 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery: "counts_query": counts_query, "bounce_rate_query": bounce_rate_query, }, + backend="cpp", ) return top_sources_query