Skip to content
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

Implement FILTER-clause for aggregate functions [CORE5768] #6031

Closed
firebird-automations opened this issue Mar 8, 2018 · 4 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @mrotteveel

Implement FILTER-clause for aggregate functions (introduced in SQL:2003). This syntax allows for filtering before aggregation.

Basic example:

SUM(<expression>) FILTER(WHERE <condition>)

or with window functions:

SUM(<expression>) FILTER(WHERE <condition>) OVER (<window>)

Workarounds/alternative: use a CASE-expression within the aggregate function.

See also SQL:2016 10.9 <aggregate function> and https://modern-sql.com/feature/filter

Commits: 7206db3 e33ddf8

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 4.0 Beta 1 [ 10750 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: No test => Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

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

No branches or pull requests

2 participants