MCPcopy Create free account
hub / github.com/sqlalchemy/sqlalchemy / within_group

Method within_group

lib/sqlalchemy/sql/functions.py:489–507  ·  view source on GitHub ↗

Produce a WITHIN GROUP (ORDER BY expr) clause against this function. Used against so-called "ordered set aggregate" and "hypothetical set aggregate" functions, including :class:`.percentile_cont`, :class:`.rank`, :class:`.dense_rank`, etc. See :func:`_expression.wit

(
        self, *order_by: _ColumnExpressionArgument[Any]
    )

Source from the content-addressed store, hash-verified

487 )
488
489 def within_group(
490 self, *order_by: _ColumnExpressionArgument[Any]
491 ) -> WithinGroup[_T]:
492 """Produce a WITHIN GROUP (ORDER BY expr) clause against this function.
493
494 Used against so-called "ordered set aggregate" and "hypothetical
495 set aggregate" functions, including :class:`.percentile_cont`,
496 :class:`.rank`, :class:`.dense_rank`, etc.
497
498 See :func:`_expression.within_group` for a full description.
499
500 .. seealso::
501
502 :ref:`tutorial_functions_within_group` -
503 in the :ref:`unified_tutorial`
504
505
506 """
507 return WithinGroup(self, *order_by)
508
509 @overload
510 def filter(self) -> Self: ...

Callers

nothing calls this directly

Calls 1

WithinGroupClass · 0.85

Tested by

no test coverage detected