Grouping by expression
- Last Updated: March 30, 2020
- 1 minute read
- OpenEdge
- Version 12.2
- Documentation
Grouping by expression
The GROUP BY clause orders
the result set according to an expression used in the SELECT statement.
Syntax
|
Notes
The GROUP
BY clause can contain any scalar expression which produces
a value that is used as a grouping key. An individual column, when
it is part of a larger expression in a GROUP BY list,
cannot by itself be referenced in the SELECT list.
Only the entire expression, which is the grouping key, can be used
in the statement's SELECT list. Note that a GROUP
BY expression cannot contain an aggregate expression such
as SUM.
The GROUP BY clause
does not support set differencing operations such as MINUS and INTERSECT.
Example
In
the following example, the GROUP BY clause refers to
the concatenation expression used in the SELECT statement:
|