Top Description Methods
org.jooq

public Interface OrderedAggregateFunction<T>

Known Direct Implementers
org.jooq.impl.AbstractAggregateFunction
Static Imports
org.jooq.SQLDialect.CUBRID, .SQLDialect.H2, .SQLDialect.HSQLDB, .SQLDialect.MARIADB, .SQLDialect.MYSQL, .SQLDialect.POSTGRES, .SQLDialect.YUGABYTEDB

An ordered-set aggregate function.

An ordered-set aggregate function is an aggregate function with a mandatory Oracle-specific WITHIN GROUP (ORDER BY …) clause. An example is LISTAGG:


SELECT   LISTAGG(TITLE, ', ')
         WITHIN GROUP (ORDER BY TITLE)
FROM     T_BOOK
GROUP BY AUTHOR_ID
The above function groups books by author and aggregates titles into a concatenated string.

Ordered-set aggregate functions can be further converted into window functions using the OVER(PARTITION BY …) clause. For example:


SELECT LISTAGG(TITLE, ', ')
       WITHIN GROUP (ORDER BY TITLE)
       OVER (PARTITION BY AUTHOR_ID)
FROM   T_BOOK
Author
Lukas Eder

Method Summary

Modifier and TypeMethod and Description
public @NotNull AggregateFilterStep<T>
withinGroupOrderBy(OrderField<?>... fields)

Deprecated as a consequence of AggregateFilterStep being deprecated.
Add an WITHIN GROUP (ORDER BY …) clause to the ordered aggregate function
public @NotNull AggregateFilterStep<T>
withinGroupOrderBy(Collection<? extends OrderField<?>> fields)

Deprecated as a consequence of AggregateFilterStep being deprecated.
Add an WITHIN GROUP (ORDER BY …) clause to the ordered aggregate function

Method Detail

withinGroupOrderByback to summary
public @NotNull AggregateFilterStep<T> withinGroupOrderBy(OrderField<?>... fields)

Deprecated

as a consequence of AggregateFilterStep being deprecated. See corresponding docs for further information.

Add an WITHIN GROUP (ORDER BY …) clause to the ordered aggregate function

Annotations
@NotNull
@Support:CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, YUGABYTEDB
withinGroupOrderByback to summary
public @NotNull AggregateFilterStep<T> withinGroupOrderBy(Collection<? extends OrderField<?>> fields)

Deprecated

as a consequence of AggregateFilterStep being deprecated. See corresponding docs for further information.

Add an WITHIN GROUP (ORDER BY …) clause to the ordered aggregate function

Annotations
@NotNull
@Support:CUBRID, H2, HSQLDB, MARIADB, MYSQL, POSTGRES, YUGABYTEDB