i want grouping excelsheet record on the basis of id in winform application c# the example table is given below, reply as soon as possible
| Id | Name | Amount |
| A | AAAA | 1000 |
| B | BBBB | 500 |
| C | CCCC | 250 |
| A | AAAA | 1500 |
| B | BBBB | 1250 |
| C | CCCC | 1000 |
| A | AAAA | 2000 |
| B | BBBB | 1750 |
| C | CCCC | 1500 |

Amitesh VermaRank #2,535 · 552 reputationPosted Aug 5, 2015, 3:28 AM EDT
insert into #temp1 values('A','ABC',3200)
insert into #temp1 values('B','ABBB',7800)
insert into #temp1 values('A','ABC',2000)
insert into #temp1 values('A','ABC',1200)
insert into #temp1 values('C','AAAA',2000)
insert into #temp1 values('C','AAAA',5000)
SELECT * FROM #temp1
select SUM(amount),id,name from #temp1 group by id,name
Upendra Pratap ShahiRank #329 · 7.5K reputationPosted Aug 5, 2015, 3:51 AM EDT