Module org.jooq
Package org.jooq.impl

Interface QOM.Product

All Superinterfaces:
AggregateFilterStep<BigDecimal>, AggregateFunction<BigDecimal>, Field<BigDecimal>, FieldOrConstraint, FieldOrRow, FieldOrRowOrSelect, GroupField, Named, OrderField<BigDecimal>, QueryPart, SelectField<BigDecimal>, SelectFieldOrAsterisk, Serializable, TableElement, Typed<BigDecimal>, WindowBeforeOverStep<BigDecimal>, WindowOverStep<BigDecimal>
Enclosing class:
QOM

public static interface QOM.Product extends AggregateFunction<BigDecimal>
The PRODUCT function.

Get the sum over a numeric field: product(distinct field).

Few dialects currently support multiplicative aggregation natively. jOOQ emulates this using exp(sum(log(arg))) for strictly positive numbers, and does some additional handling for zero and negative numbers.

Note that this implementation may introduce rounding errors, even for integer multiplication.

More information here: https://blog.jooq.org/how-to-write-a-multiplication-aggregate-function-in-sql.