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
GROUP BY clause
Applies to ✅ Open Source Edition ✅ Express Edition ✅ Professional Edition ✅ Enterprise Edition
GROUP BY
can be used to create unique groups of data, to form aggregations, to remove duplicates and for other reasons. It will transform your previously defined set of table expressions, and return only one record per unique group as specified in this clause.
Table of contents
- 3.3.4.7.1.
- GROUP BY columns
- 3.3.4.7.2.
- GROUP BY ROLLUP
- 3.3.4.7.3.
- GROUP BY CUBE
- 3.3.4.7.4.
- GROUP BY GROUPING SETS
- 3.3.4.7.5.
- GROUP BY empty grouping set
previous : next |
References to this page
- Using the empty grouping set in GROUP BY
- The HAVING clause of the SELECT statement
- Lexical and logical SELECT clause order
- How aggregate functions interact with GROUP BY
- Aggregating a subset of a group's data using FILTER
- The window function PARTITION BY clause
- User-defined aggregate functions
- Don't do this in SQL: rely on implicit ordering
- Don't do this in SQL: SELECT DISTINCT
Feedback
Do you have any feedback about this page? We'd love to hear it!