Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I Am having data like


ID NOOFUNITS
1 20
2 10
3 10
3 10
4 10
4 10
4 10

So i need data like for id 1 i should get 20 and for id2 i sholud get 20 for ID 3 i should get 20 and for ID 4 i sholud get 30
Posted

1 solution

Learn the basics of sum and group by : SQL GROUP BY Statement[^]
 
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