Skip to content

Support defining windowing behavior in the WINDOW clause #760

Closed

Description

@mingmwang

PostgreSQL and SparkSQL support defining the windowing behavior in the WINDOW clause and then referenced in OVER.
This is very useful if the same windowing behavior is wanted for several functions.

For example:

SELECT sum(salary) OVER w, avg(salary) OVER w
  FROM empsalary
  WINDOW w AS (PARTITION BY depname ORDER BY salary DESC);

https://www.postgresql.org/docs/15/tutorial-window.html

https://www.postgresql.org/docs/15/sql-expressions.html#SYNTAX-WINDOW-FUNCTIONS

Activity

  1. pepijnve commented on Jan 9, 2025

    @pepijnve

    I think this was implemented in #881

  2. LucaCappelletti94 commented on Sep 22, 2026

    @LucaCappelletti94
    Contributor

    Closing as completed in #881

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions