Skip to content

min

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

Find the minimum value.

  • *args

    (AggValue, default: ()) - Values to find minimum from.
  • Aggregate - An Aggregate representing the computation of the minimum value. Returns the same type as the input.

Find minimum salary:

select(aggregates.min(Employee.salary))

Find minimum price per category:

select(
Category,
aggregates.min(Product.price).per(Category).where(Product.category == Category),
)