Skip to content

rank_asc

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

Compute rank in ascending order.

  • *args

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

Rank students by test score (lowest to highest):

>>> select(Student, aggregates.rank_asc(Student.test_score))