.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Post New Resource Bookmark and Share   

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

Posted By:Karthikeyan Anbarasan       Posted Date: July 31, 2011    Points: 40    Category:    URL: http://www.dotnetspark.com  

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.

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend