Ansicht
Dokumentation

ABENSQL_EXPR_OVER_GROUP_ABEXA - SQL EXPR OVER GROUP ABEXA

ABENSQL_EXPR_OVER_GROUP_ABEXA - SQL EXPR OVER GROUP ABEXA

CPI1466 during Backup   Addresses (Business Address Services)  
This documentation is copyright by SAP AG.
SAP E-Book

- Window Expressions with Grouping

This example demonstrates window expressions for a grouped result set.

Source Code

Execute

Description

The example shows the combination of window expressions in the SELECT list with a GROUP BY clause. In this case, aggregate functions used as a window function can also have aggregate functions as arguments.

The GROUP BY clause groups by the columns CHAR1 and CHAR2. In the result set created by this, OVER is used to define windows whose window criterion is the column CHAR1. Aggregate expressions that can be specified as columns in the SELECT list due to the GROUP BY clause are also used as arguments of window functions.

The aggregate functions used as an argument of window functions would not need to appear as separately specified columns in the SELECT list but are shown here anyway to highlight how these values are produced.






RFUMSV00 - Advance Return for Tax on Sales/Purchases   General Data in Customer Master  
This documentation is copyright by SAP AG.

Length: 1537 Date: 20240425 Time: 030946     sap01-206 ( 27 ms )