Module org.jooq
Package org.jooq

Interface AggregateFunction<T>

All Superinterfaces:
AggregateFilterStep<T>, Field<T>, FieldOrConstraint, FieldOrRow, GroupField, Named, OrderField<T>, QueryPart, SelectField<T>, SelectFieldOrAsterisk, Serializable, Typed<T>, WindowBeforeOverStep<T>, WindowOverStep<T>
All Known Subinterfaces:
GroupConcatOrderByStep, GroupConcatSeparatorStep

public interface AggregateFunction<T> extends AggregateFilterStep<T>
An aggregate function.

An aggregate function is a special field that is usually used in a GROUP BY context. It is also the base for window function construction.

Example:

 // Assuming import static org.jooq.impl.DSL.*;

 using(configuration)
    .select(ACTOR.LAST_NAME, count())
    .from(ACTOR)
    .groupBy(ACTOR.LAST_NAME)
    .orderBy(count().desc())
    .fetch();
 

Instances can be created using various DSL methods and their overloads, such as DSL.count() or DSL.countDistinct(Field).

Author:
Lukas Eder