product
relationalai.semantics.std.aggregates
product(*args: AggValue) -> AggregateCompute the product of numeric values using the exp-log trick.
Handles negative inputs by taking abs before log-summing and tracking the sign via the parity of the negative-value count. Zero inputs yield 0.0 (exp(-inf) = 0.0 by IEEE 754); in grouped queries zeros are contained to their own group and do not affect other groups. Results are floating-point approximations — integer inputs are cast to Float before aggregation.
Parameters
Section titled “Parameters”
(*argsAggValue, default:()) - Values to multiply together.
Returns
Section titled “Returns”Aggregate- AnAggregaterepresenting the product. Always returnsFloat.
Examples
Section titled “Examples”Compute product of all quantities:
select(aggregates.product(Item.quantity))Compute product per category:
select(Category, aggregates.product(Item.quantity).per(Category))