Skip to main content

GROUP BY Aggregation

IntermediateOpen SQL⏱ 15 min

Task

Calculate total quantity per plant using GROUP BY and aggregation functions.

Write Your ABAP Code

ABAP Editor
Loading...
📥 Sample Input & Output
WERKS  MENGE
1000   15
2000   8
💡 Hint

Use SUM() with GROUP BY

✅ View Reference Solution
SELECT werks, SUM( menge ) AS total
  FROM zsales
  GROUP BY werks
  INTO TABLE @DATA(lt_result).