Available in versions: Dev (3.21) | Latest (3.20) | 3.19 | 3.18 | 3.17 | 3.16 | 3.15 | 3.14 | 3.13 | 3.12 | 3.11
Aggregate functions
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
Aggregate functions work like Java java.util.stream.Collector
, as they aggregate data from a group of data into a new data structure.
This section will first explain concepts common to many aggregate functions, and then proceed to explaining individual aggregate functions supported by jOOQ.
Table of contents
- 3.11.25.1.
- Grouping
- 3.11.25.2.
- Distinctness
- 3.11.25.3.
- Filtering
- 3.11.25.4.
- Ordering
- 3.11.25.5.
- Ordering WITHIN GROUP
- 3.11.25.6.
- Keeping
- 3.11.25.7.
- ANY_VALUE
- 3.11.25.8.
- ARRAY_AGG
- 3.11.25.9.
- AVG
- 3.11.25.10.
- LISTAGG (binary) (new)
- 3.11.25.11.
- BIT_AND_AGG
- 3.11.25.12.
- BIT_NAND_AGG
- 3.11.25.13.
- BIT_NOR_AGG
- 3.11.25.14.
- BIT_OR_AGG
- 3.11.25.15.
- BIT_XOR_AGG
- 3.11.25.16.
- BIT_XNOR_AGG
- 3.11.25.17.
- BOOL_AND
- 3.11.25.18.
- BOOL_OR
- 3.11.25.19.
- COLLECT
- 3.11.25.20.
- COUNT
- 3.11.25.21.
- CUME_DIST
- 3.11.25.22.
- DENSE_RANK
- 3.11.25.23.
- EVERY
- 3.11.25.24.
- GROUP_CONCAT
- 3.11.25.25.
- JSON_ARRAYAGG
- 3.11.25.26.
- JSON_OBJECTAGG
- 3.11.25.27.
- LISTAGG
- 3.11.25.28.
- MAX
- 3.11.25.29.
- MAX_BY (new)
- 3.11.25.30.
- MEDIAN
- 3.11.25.31.
- MIN
- 3.11.25.32.
- MIN_BY (new)
- 3.11.25.33.
- MODE
- 3.11.25.34.
- MULTISET_AGG
- 3.11.25.35.
- PERCENT_RANK
- 3.11.25.36.
- PERCENTILE_CONT
- 3.11.25.37.
- PERCENTILE_DISC
- 3.11.25.38.
- PRODUCT
- 3.11.25.39.
- RANK
- 3.11.25.40.
- SUM
- 3.11.25.41.
- XMLAGG
previous : next |
References to this page
- Using column expressions in the GROUP BY clause
- Using the empty grouping set in GROUP BY
- JSON functions
- XML functions
- Spatial functions
- Aggregating a subset of a group's data using FILTER
- Window function nesting aggregate functions
- Using aggregate functions as window functions
- User-defined aggregate functions
- Pattern based transformations: Unnecessary EXISTS subquery clauses
- Pattern based transformations: Unnecessary scalar subquery
- Consecutive aggregation
- Don't do this in SQL: SELECT DISTINCT
Feedback
Do you have any feedback about this page? We'd love to hear it!