Implement FILTER-clause for aggregate functions
-----------------------------------------------

                 Key: CORE-5768
                 URL: http://tracker.firebirdsql.org/browse/CORE-5768
             Project: Firebird Core
          Issue Type: New Feature
          Components: Engine
            Reporter: Mark Rotteveel


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

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to