-
Notifications
You must be signed in to change notification settings - Fork 1.9k
User guide lists window functions #6402
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
|
||
| # Window Functions | ||
|
|
||
| Window functions calculate a value for a set of rows within a result set. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably copy some/all of the description from the postgres docs rather than having to reinvent it: https://www.postgresql.org/docs/current/tutorial-window.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the feedback! I stitched together a description of window functions from the postgres docs and added a sub-section describing the syntax.
(EDIT: Just noticed that named windows are now supported, I'll add those the syntax description next) Named window functions are described also.
alamb
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great -- thank you so much @toppyy
| ```sql | ||
| SELECT sum(salary) OVER w, avg(salary) OVER w | ||
| FROM empsalary | ||
| WINDOW w AS (PARTITION BY depname ORDER BY salary DESC); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feature (named window functions) was added just a few days ago by @berkaysynnada #6419 🎉
Which issue does this PR close?
Closes #6338.
Rationale for this change
List window functions in the user guide
What changes are included in this PR?
Are these changes tested?
Are there any user-facing changes?