Interface AggregateFunction<T>
- All Superinterfaces:
AggregateFilterStep<T>, Field<T>, FieldOrConstraint, FieldOrRow, FieldOrRowOrSelect, GroupField, Named, OrderField<T>, QueryPart, SelectField<T>, SelectFieldOrAsterisk, Serializable, TableElement, Typed<T>, WindowBeforeOverStep<T>, WindowOverStep<T>
- All Known Subinterfaces:
GroupConcatOrderByStep, GroupConcatSeparatorStep, QOM.AggregateFunction<T,Q>, QOM.AnyValue<T>, QOM.ApproxCountDistinct, QOM.ApproxCountLargeDistinct, QOM.ApproxPercentileCont, QOM.ApproxPercentileDisc, QOM.ArrayAgg<T>, QOM.Avg, QOM.BinaryListAgg, QOM.BitAndAgg<T>, QOM.BitNandAgg<T>, QOM.BitNorAgg<T>, QOM.BitOrAgg<T>, QOM.BitXNorAgg<T>, QOM.BitXorAgg<T>, QOM.BoolAnd, QOM.BoolOr, QOM.Collect<T, A>, QOM.Corr, QOM.Count, QOM.CountLarge, QOM.CountLargeMultiple, QOM.CountLargeTable, QOM.CountMultiple, QOM.CountTable, QOM.CovarPop, QOM.CovarSamp, QOM.CumeDistAgg, QOM.DenseRankAgg, QOM.JSONArrayAgg<J>, QOM.JSONObjectAgg<J>, QOM.ListAgg, QOM.Max<T>, QOM.MaxBy<T>, QOM.Median, QOM.Min<T>, QOM.MinBy<T>, QOM.Mode<T>, QOM.ModeOrdered<T>, QOM.MultisetAgg<R>, QOM.OrderedAggregateFunction<T, Q>, QOM.PercentileCont, QOM.PercentileDisc, QOM.PercentRankAgg, QOM.Product, QOM.RankAgg, QOM.RatioToReport, QOM.RegrAvgX, QOM.RegrAvgY, QOM.RegrCount, QOM.RegrIntercept, QOM.RegrR2, QOM.RegrSlope, QOM.RegrSxx, QOM.RegrSxy, QOM.RegrSyy, QOM.StddevPop, QOM.StddevSamp, QOM.Sum, QOM.VarPop, QOM.VarSamp, QOM.XMLAgg
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
-
Method Summary
Modifier and TypeMethodDescription@Nullable ConditionExperimental query object model accessor method, see alsoQOM.@NotNull AggregateFilterStep<T> keepDenseRankFirstOrderBy(Collection<? extends OrderField<?>> fields) Restrict this aggregate function toFIRSTvalues@NotNull AggregateFilterStep<T> keepDenseRankFirstOrderBy(OrderField<?>... fields) Restrict this aggregate function toFIRSTvalues@NotNull AggregateFilterStep<T> keepDenseRankLastOrderBy(Collection<? extends OrderField<?>> fields) Restrict this aggregate function toLASTvalues@NotNull AggregateFilterStep<T> keepDenseRankLastOrderBy(OrderField<?>... fields) Restrict this aggregate function toLASTvaluesMethods inherited from interface AggregateFilterStep
filterWhere, filterWhere, filterWhere, filterWhere, filterWhere, filterWhere, filterWhere, filterWhereMethods inherited from interface Field
add, add, as, as, as, as, asc, ascii, between, between, between, between, betweenSymmetric, betweenSymmetric, betweenSymmetric, betweenSymmetric, binaryLike, binaryLike, binaryLike, bitAnd, bitAnd, bitLength, bitNand, bitNand, bitNor, bitNor, bitNot, bitOr, bitOr, bitXNor, bitXNor, bitXor, bitXor, cast, cast, cast, changed, charLength, coalesce, coalesce, coerce, coerce, coerce, collate, collate, collate, comment, comment, compare, compare, compare, compare, concat, concat, concat, contains, contains, containsIgnoreCase, containsIgnoreCase, convert, convert, convert, convertFrom, convertFrom, convertTo, convertTo, decode, decode, decode, decode, desc, div, div, divide, divide, endsWith, endsWith, endsWithIgnoreCase, endsWithIgnoreCase, eq, eq, eq, eq, equal, equal, equal, equal, equalIgnoreCase, equalIgnoreCase, equals, field, from, ge, ge, ge, ge, get, getComment, getName, getValue, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterOrEqual, greaterThan, greaterThan, greaterThan, greaterThan, gt, gt, gt, gt, in, in, in, in, in, isDistinctFrom, isDistinctFrom, isDistinctFrom, isDocument, isFalse, isJson, isNotDistinctFrom, isNotDistinctFrom, isNotDistinctFrom, isNotDocument, isNotJson, isNotNull, isNull, isTrue, le, le, le, le, length, lessOrEqual, lessOrEqual, lessOrEqual, lessOrEqual, lessThan, lessThan, lessThan, lessThan, like, like, like, like, like, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeIgnoreCase, likeRegex, likeRegex, lower, lpad, lpad, lpad, lpad, lt, lt, lt, lt, ltrim, minus, minus, mod, mod, modulo, modulo, mul, mul, multiply, multiply, ne, ne, ne, ne, neg, notBetween, notBetween, notBetween, notBetween, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notBetweenSymmetric, notBinaryLike, notBinaryLike, notBinaryLike, notContains, notContains, notContainsIgnoreCase, notContainsIgnoreCase, notEqual, notEqual, notEqual, notEqual, notEqualIgnoreCase, notEqualIgnoreCase, notIn, notIn, notIn, notIn, notIn, notLike, notLike, notLike, notLike, notLike, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeIgnoreCase, notLikeRegex, notLikeRegex, notSimilarTo, notSimilarTo, notSimilarTo, notSimilarTo, notSimilarTo, nullif, nullif, nullsFirst, nullsLast, nvl, nvl, nvl2, nvl2, octetLength, original, plus, plus, plus, position, position, pow, pow, power, power, rem, rem, repeat, repeat, replace, replace, replace, replace, reset, rpad, rpad, rpad, rpad, rtrim, shl, shl, shr, shr, similarTo, similarTo, similarTo, similarTo, similarTo, sort, sort, sortAsc, sortAsc, sortDefault, sortDesc, sortDesc, startsWith, startsWith, startsWithIgnoreCase, startsWithIgnoreCase, sub, sub, substring, substring, substring, substring, subtract, subtract, times, times, touched, trim, unaryMinus, unaryPlus, upperMethods inherited from interface Named
$name, getCommentPart, getQualifiedName, getUnqualifiedNameMethods inherited from interface QueryPart
$replace, $replace, $traverse, $traverse, hashCode, toStringMethods inherited from interface Typed
$dataType, getBinding, getConverter, getDataType, getDataType, getType
-
Method Details
-
keepDenseRankFirstOrderBy
@NotNull @Support(ORACLE) @Pro @NotNull AggregateFilterStep<T> keepDenseRankFirstOrderBy(OrderField<?>... fields) Restrict this aggregate function toFIRSTvaluesAn example:
MAX(id) KEEP (DENSE_RANK FIRST ORDER BY 1) -
keepDenseRankFirstOrderBy
@NotNull @Support(ORACLE) @Pro @NotNull AggregateFilterStep<T> keepDenseRankFirstOrderBy(Collection<? extends OrderField<?>> fields) Restrict this aggregate function toFIRSTvaluesAn example:
MAX(id) KEEP (DENSE_RANK FIRST ORDER BY 1) -
keepDenseRankLastOrderBy
@NotNull @Support(ORACLE) @Pro @NotNull AggregateFilterStep<T> keepDenseRankLastOrderBy(OrderField<?>... fields) Restrict this aggregate function toLASTvaluesAn example:
MAX(id) KEEP (DENSE_RANK LAST ORDER BY 1) -
keepDenseRankLastOrderBy
@NotNull @Support(ORACLE) @Pro @NotNull AggregateFilterStep<T> keepDenseRankLastOrderBy(Collection<? extends OrderField<?>> fields) Restrict this aggregate function toLASTvaluesAn example:
MAX(id) KEEP (DENSE_RANK LAST ORDER BY 1) -
$filterWhere
-