SQL Server Transact Basic to Expert - Using SUM function to get summation of values

This blog show how to use the SUM function to get the summation of values from a table using SQL.

Example:

SELECT  AcctNumber,
      SUM(TotalAmountDue) TotalDue
FROM DBO.SalesOrder
GROUP BY AcctNumber
ORDER BY AcctNumber

SUM() - this is the function used to get the summation.
Ebook Download
View all
Learn
View all