"if you encounter any errors in SAP, send me a screenshot at pramod@learntosap.com, and I will help you resolve the issue."

SQL SUM() Function

SQL TUTORIALS-

SQL SUM() Function

Introduction-


Trulli Trulli

-✅SUM() function adds up all the numeric values in a specified column...


Emoji Examples in HTML

🔸 Example Table: Orders

OrderID Customer Product Quantity Price
1 ANNI Mobile 1 30000
2 POOJA Laptop 1 35000
3 RAJ Tablet 1 40000

✅ Example 1: Total Sales Amount.



SELECT SUM(Price) AS TotalSales FROM Orders;

✅Result Show :-

TotalSales → 105000 |


✅ Example 2: Total Quantity Sold.



SELECT SUM(Quantity) AS TotalQuantity FROM Orders;


✅Result Show :-

TotalQuantity → 3 |


✅ Example 3: Total Sales by Product.



SELECT Product, SUM(Price) AS ProductSales
FROM Orders
GROUP BY Product;



✅Result Show :-

Emoji Examples in HTML

🔸 Example Table: Product

Product ProductSales
Laptop 1
Mobile 1
Tablet 1

✅ Example 4: Total Price by Customer.



SELECT Customer, SUM(Price) AS CustomerSpending
FROM Orders
GROUP BY Customer;

May Be Like Important Link-

-How To Import Data(LSMW) LEGACY SYSTEM MIGRATION WORKBENCH

-Define Condition Type-OBYZ

-Genral Ledger Chart Of Accounts-OBD4

-Document 90039783 saved (no accounting document generated)