max
relationalai.semantics.std.aggregates
max(*args: AggValue) -> AggregateFind the maximum value.
Parameters
Section titled “Parameters”
(*argsAggValue, default:()) - Values to find maximum from.
Returns
Section titled “Returns”Aggregate- AnAggregaterepresenting the computation of the maximum value. Returns the same type as the input.
Examples
Section titled “Examples”Find maximum salary:
>>> select(aggregates.max(Employee.salary))Find maximum order amount per customer:
>>> select(Customer, aggregates.max(Order.amount).per(Customer).where(Order.customer == Customer))Referenced By
Section titled “Referenced By”RelationalAI Documentation
└── Build With RelationalAI
└── Understand how PyRel works > Use advanced reasoning > Rules-based reasoning
└── Aggregate and group data
└── Find maximum values with .max()