From 099fa5b3020ec20b4328223c094ab776e780fee1 Mon Sep 17 00:00:00 2001 From: "inkeep[bot]" <257615677+inkeep[bot]@users.noreply.github.com> Date: Tue, 21 Apr 2026 18:03:59 +0000 Subject: [PATCH] docs(breakdowns): add tip about aliasing SQL breakdown expressions Document the `AS column_name` and `-- column_name` aliasing technique for SQL breakdown expressions, matching the in-product hint added in PostHog/posthog#55405. --- contents/docs/product-analytics/trends/breakdowns.mdx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contents/docs/product-analytics/trends/breakdowns.mdx b/contents/docs/product-analytics/trends/breakdowns.mdx index b16d5dc82b1e..ec5ca7b291c6 100644 --- a/contents/docs/product-analytics/trends/breakdowns.mdx +++ b/contents/docs/product-analytics/trends/breakdowns.mdx @@ -66,6 +66,8 @@ To breakdown by the combination of browser and operating system, for example, yo concat(properties.$browser, ' - ', properties.$os) ``` +> **Tip:** For complex SQL expressions, add `AS column_name` or `-- column_name` to the end of your expression to use a readable label instead of the raw expression in charts and tables. For example: `sumIf(1, properties.$browser = 'Chrome') AS chrome_count`. + See our [SQL expression docs](/docs/sql/expressions) for more information. ## Cohorts and breakdowns