Skip to content

Commit

Permalink
Make top pages query not a f-string
Browse files Browse the repository at this point in the history
  • Loading branch information
robbie-c committed Oct 3, 2023
1 parent 9210f9e commit 7a092bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions posthog/hogql_queries/web_analytics/top_pages.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery:
pathname_query = parse_select(PATHNAME_CTE, timings=self.timings)
with self.timings.measure("top_pages_query"):
top_sources_query = parse_select(
f"""
"""
SELECT
pathname.pathname as pathname,
pathname.total_pageviews as total_pageviews,
Expand All @@ -30,14 +30,14 @@ def to_query(self) -> ast.SelectQuery | ast.SelectUnionQuery:
pathname.average_scroll_percentage as average_scroll_percentage,
bounce_rate.bounce_rate as bounce_rate
FROM
({pathname_query}) AS pathname
{pathname_query} AS pathname
LEFT OUTER JOIN
(
SELECT
session.earliest_pathname,
avg(session.is_bounce) as bounce_rate
FROM
({session_query}) AS session
{session_query} AS session
GROUP BY
session.earliest_pathname
) AS bounce_rate
Expand Down

0 comments on commit 7a092bd

Please sign in to comment.