Ansicht
Dokumentation

ABAPSELECT_AGGREGATE - SELECT AGGREGATE

ABAPSELECT_AGGREGATE - SELECT AGGREGATE

SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up   rdisp/max_wprun_time - Maximum work process run time  
This documentation is copyright by SAP AG.
SAP E-Book

- sql_agg

Short Reference



... agg_func ...

Effect

Aggregate expression in. An aggregate expression consists of an aggregate function agg_func that aggregates the values of multiple rows of the result set of a query into a single value. It can be used in the following operand positions:

Here, an aggregate expression can be specified directly or as an operand of an SQL expression except for another aggregate expression.
  • As an operand on the right side of relational expressions of the condition sql_cond of the HAVING clause of a query. Here, no SQL expressions can be used except for directly specified aggregate expressions.

All aggregate functions can be used as an aggregate expression except for PRODUCT. An aggregate function used as an aggregate expression can have one of the following arguments:

  • An SQL expression sql_exp except aggregate expressions and window expressions for the aggregate functions MAX, MIN, SUM, STRING_AGG, and COUNT.

The aggregate functions take the values of the column or the results of the SQL expression of multiple rows of the query result set and determine a single value. Either all rows of the result set or the rows of the current group created using GROUP BY are evaluated. If the value of an aggregate expression is too large for the target area, an exception is raised.

Notes

  • If SQL expressions other than directly specified columns are specified as arguments of aggregate expressions, the syntax check is performed in a strict mode, which handles the statement more strictly than the regular syntax check.

Example

Returns the flight date, the number of passengers, and the average and maximum luggage weight of all Lufthansa flights with the flight number 0400.






Fill RESBD Structure from EBP Component Structure   SUBST_MERGE_LIST - merge external lists to one complete list with #if... logic for R3up  
This documentation is copyright by SAP AG.

Length: 5021 Date: 20240426 Time: 155222     sap01-206 ( 64 ms )