Skip to content
Advertisement

how to sum multiple rows with same id in SQL Server

Lets say I have following table:

And I want to perform a select query in SQL server which sums the value of “no” field which have same id. Result should look like this,

Advertisement

Answer

Simple GROUP BY and SUM should work.

User contributions licensed under: CC BY-SA
9 People found this is helpful
Advertisement