1. Michael Bayer
  2. sqlalchemy
  3. Issues

Issues

Issue #1370 resolved

Support percentile_cont, other ordered-set aggregate

Anonymous created an issue

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...

Function Description

Comments (7)

  1. Michael Bayer 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 #3516

    percentile_disc, given Array - Array of sort expression - see #3516

  2. Michael Bayer repo owner
    • 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>>

  3. Log in to comment