Loading lesson path
Concept visual
Start at both ends
Return the sum of the "Quantity" field in the "OrderDetails" table:
SELECT SUM(Quantity) AS TotalItemsOrdered FROM OrderDetails;The SUM() function calculates the sum of a set of values.
NULL values are ignored.
expression )
Required. A field or a formula
SQL Server (starting with 2008), Azure SQL Database, Azure SQL Data Warehouse, Parallel Data Warehouse
❮ SQL Server Functions