Click here to Skip to main content
15,881,882 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have EmployeesDetails table i need to sum the columns like
Customer1 has 3 values 1000,1000,1000(3 rows Column name is amount)
Customer2 has 2 values 2000,2000 (2 Rows column name is same amount)
i need to display the values
Customer1 3000
Customer2 4000
can anyone help

1 solution

SELECT Id, SUM(amount) FROM myTable GROUP BY Id
Share this answer

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900