Skip to content

rank_desc

relationalai.semantics.std.aggregates
rank_desc(*args: AggValue) -> Aggregate

Compute rank in descending order.

  • *args

    (AggValue, default: ()) - Values to rank in descending order.
  • Aggregate - An Aggregate representing the computation of the descending rank. Returns Integer.

Rank students by test score (highest to lowest):

select(Student, aggregates.rank_desc(Student.test_score))
RelationalAI Documentation
└──  Release Notes
    └──  Python API Release Notes
        └──  What’s New in Version 1.0.14
            └──  Bug Fixes