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.
SQL Server Transact Basic to Expert - Using SUM function to get summation of values
SQL Server Transact Basic to Expert - Using SUM function to get summation of values


Join the conversation! Your thoughts help the community grow.