Support percentile_cont, other ordered-set aggregate
Oracle has a very wierd syntax for a function called percentile_cont. I can use text to perform it, but it would be nice to have an easy way to use the function from sqlalchemy, as this function needs to recieve a column (or expression) in the "order by" part...
Comments (7)
-
Account Deleted -
repo owner it would live in the oracle package and would need a full functional spec for review.
-
repo owner - changed milestone to 1.x.xx
-
repo owner - changed milestone to 1.1
- changed component to sql
- changed title to Support percentile_cont
- edited description
this is SQL standard:
Postgresql: http://www.postgresql.org/docs/current/static/functions-aggregate.html SQL Server: https://msdn.microsoft.com/en-us/library/Hh231473.aspx Oracle: http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions110.htm
easy win see if we can throw this in
-
repo owner - changed title to Support percentile_cont, other ordered-set aggregate
lets do evertyhing else under ordered-set aggregate functions and Hypothetical-Set Aggregate Functions at http://www.postgresql.org/docs/current/static/functions-aggregate.html:
dense_rank rank cume_dist percent_rank mode percentile_cont percentile_disc
-
repo owner dense_rank - Integer
rank - Integer
cume_dist - Numeric
percent_rank - Numeric
mode - same as sort expression
percentile_cont -same as sort expression
percentile_disc - same as sort expression
percentile_cont, given Array - Array of sort expression - see
#3516percentile_disc, given Array - Array of sort expression - see
#3516 -
repo owner - changed status to resolved
- Added support for "set-aggregate" functions of the form
<function> WITHIN GROUP (ORDER BY <criteria>)
, using the method :class:.FunctionElement.within_group
. A series of common set-aggregate functions with return types derived from the set have been added. This includes functions like :class:.percentile_cont
, :class:.dense_rank
and others. fixes#1370 - make sure we use func.name for all _literal_as_binds in functions.py so we get consistent naming behavior for parameters.
→ <<cset 7c4512cbeb1c>>
- Log in to comment
submitted by kobipe3@gmail.com