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 -

c# - The item with identity 'Id' already exists in the metadata collection. Parameter name: item -

c++ - Redefined variable in the other module -