ABAP Keyword Documentation → ABAP − Short Reference
aggregate - Short Reference
Other versions: 7.31 | 7.40 | 7.54
Syntax
... { AVG( [DISTINCT] col )
| MAX( [DISTINCT] col|sql_exp )
| MIN( [DISTINCT] col|sql_exp )
| SUM( [DISTINCT] col|sql_exp )
| COUNT( DISTINCT col|sql_exp )
| COUNT( * )
| COUNT(*) } ...
Effect
Aggregate
expressions in the statement SELECT
.
Additions
-
AVG( [DISTINCT] col )
Average value of the values in the columncol
. -
MAX( [DISTINCT] col|sql_exp )
Maximum value of the values in the columncol
or of the result of the SQL expressionsql_exp
. -
MIN( [DISTINCT] col|sql_exp )
Minimum value of the values in the columncol
or of the result of the SQL expressionsql_exp
. -
AVG( [DISTINCT] col )
Average value of the values in the columncol
or of the result of the SQL expressionsql_exp
. -
SUM( [DISTINCT] col|sql_exp )
Total of the values in the columncol
or of the result of the SQL expressionsql_exp
. -
COUNT( DISTINCT col|sql_exp )
Number of distinct values in the columncol
or of the result of the SQL expressionsql_exp
. -
COUNT( * )
,COUNT(*)
Number of rows in the results set.