Skip to content

Document window function limits on dimensions and metrics - #1108

Merged
jesshitchcock merged 2 commits into
mainfrom
mintlify/0937d891
Aug 13, 2026
Merged

Document window function limits on dimensions and metrics#1108
jesshitchcock merged 2 commits into
mainfrom
mintlify/0937d891

Conversation

@mintlify

@mintlify mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Adds explicit callouts in the Dimensions and Metrics references explaining that:

  • Dimensions cannot use window functions in their sql (dimension SQL runs in the same SELECT as the main GROUP BY, where window functions are not allowed).
  • Aggregate metrics cannot use window functions in their sql (their SQL is wrapped in an aggregate function during the main GROUP BY, and SQL disallows window functions inside aggregate calls).
  • Non-aggregate metrics cannot use window functions in their sql (they sit alongside aggregate metrics in the same SELECT, which runs at the GROUP BY step).
  • Post calculation metrics can use window functions, because Lightdash wraps the aggregated results in an outer SELECT and evaluates them there — where OVER (...) clauses are valid.

Points users to post calculation metrics (for metric-side window logic) and table calculations (for row-level window logic on query results).


Generated by Mintlify Agent.

Requested by: jess@lightdash.com via Slack
Mintlify session: slack_1786611799.895439_C0AM8D5UUR5

@mintlify

mintlify Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor Author

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
lightdash 🟢 Ready View Preview Aug 13, 2026, 9:07 AM

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🤖 Documentation Bot

All checks passed! No issues found.

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

🤖 Documentation Bot

All checks passed! No issues found.

@jesshitchcock
jesshitchcock merged commit a340ce8 into main Aug 13, 2026
6 checks passed
@jesshitchcock
jesshitchcock deleted the mintlify/0937d891 branch August 13, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant