Skip to content

ABAP Keyword Documentation →  ABAP − Short Reference 

aggregate - Short Reference

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 column col.
  • MAX( [DISTINCT] col|sql_exp )
    Maximum value of the values in the column col or of the result of the SQL expression sql_exp.
  • MIN( [DISTINCT] col|sql_exp )
    Minimum value of the values in the column col or of the result of the SQL expression sql_exp.
  • AVG( [DISTINCT] col )
    Average value of the values in the column col or of the result of the SQL expression sql_exp.
  • SUM( [DISTINCT] col|sql_exp )
    Total of the values in the column col or of the result of the SQL expression sql_exp.
  • COUNT( DISTINCT col|sql_exp )
    Number of distinct values in the column col or of the result of the SQL expression sql_exp.
  • COUNT( * ), COUNT(*)
    Number of rows in the results set.