Hai all
I have two tables. table1 and table2 as follows
Table1id | date | amnt |
---|
1 | 01/01/2011 | 100 |
1 | 05/01/2011 | 100 |
1 | 10/01/2011 | 50 |
1 | 16/01/2011 | 500 |
1 | 17/01/2011 | 550 |
2 | 01/01/2011 | 10 |
2 | 15/01/2011 | 100 |
2 | 18/01/2011 | 800 |
2 | 20/01/2011 | 450 |
3 | 10/01/2011 | 15 |
Table2id | nan | hnm |
---|
1 | Madhu | Namparayil |
2 | Anoop | Puthenveettil |
3 | Dhanya | Payyampallil |
I want id, nam,hnm, sum(amnt) of the above three customers as follows
1-Madhu - Namparayil - 1300
2-Anoop - Puthenveettil - 1360
3-Dhanya - Payyampallil - 15
Please give SQL command using c#