SQL calculating sum based on another column -


I have a table with the following data:

  account number amount 13 40 34 30 14 30 13 60 14 10 How can I write a question to return the following information  
  account number total amount 13 100 14 40 34 30  

The query should calculate the sum of all the quantities in the amount column that shares the same account number.

Any help would be appreciated!

Please try:

  select [account number] The amount (amount) amount of yourtable group by [account number]  

Comments

Popular posts from this blog

asp.net - Procedure or function "Procedure name" expects a parameter "Param name" which was not supplied occurs rarely -

sql server ce - Is there some way to make sqlce3.5 and 4.0 co-exist in the C# project -

jsp - No mapping found for HTTP request with URI with annotation config Spring MVC and Jetty -