median
relationalai.semantics.std.aggregates
median(*args: AggValue) -> AggregateCompute the median (50th percentile) of values, interpolating linearly between the two closest ranks.
Parameters
(*argsAggValue, default:()) - Values to compute the median over.
Returns
Aggregate- AnAggregaterepresenting the computation of the median. Always returnsFloat.
Examples
Compute the median order amount:
select(aggregates.median(Order.amount))Compute the median salary per department:
select(Department, aggregates.median(Employee.salary).per(Department))