ABAP Keyword Documentation → ABAP - Quick Reference
sql_agg - Quick reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
... { AVG( [DISTINCT] col [AS dtype] )
| MAX( [DISTINCT] sql_exp )
| MIN( [DISTINCT] sql_exp )
| SUM( [DISTINCT] sql_exp )
| STRING_AGG(
sql_exp[,sep] [ORDER BY col1[ASCENDING|DESCENDING], ...]
| COUNT( [DISTINCT] sql_exp )
| COUNT( * )
| COUNT(*) } ...
Effect
Aggregate expressions in queries.
Additions
-
AVG( [DISTINCT] col [AS dtype] )
Average value of the values in the columncol
with an optional target data typedtype
specified. -
MAX( [DISTINCT] col|sql_exp )
Maximum value of the results of the SQL expressionsql_exp
. -
MIN( [DISTINCT] col|sql_exp )
Minimum value of the results of the SQL expressionsql_exp
. -
AVG( [DISTINCT] col )
Average value of the results of the SQL expressionsql_exp
. -
SUM( [DISTINCT] col|sql_exp )
Total of the results of the SQL expressionsql_exp
. -
STRING_AGG( sql_exp[,sep] [ORDER BY col1[ASCENDING|DESCENDING], ...] )
Chaining of the results of the SQL expressionsql_exp
. -
COUNT( [DISTINCT] col|sql_exp )
Number of the results of the SQL expressionsql_exp
. -
COUNT( * )
,COUNT(*)
Number of rows in the results set.