I have used a query which is like
SELECT app_id, SUM(amount), date
FROM abc
GROUP BY app_id,date
Result is show as follows
1 10 1-2-2000
2 20 1-2-2000
3 30 1-2-2000
1 20 2-2-2000
2 40 2-2-2000
3 50 2-2-2000
I want to get desired result with new column
1 10 1-2-2000
2 30 1-2-2000 # sum of amount of app_id=1 and app_id=2
3 60 1-2-2000 # sum of amount of app_id=1 and app_id=2 and app_id=3
1 20 2-2-2000
2 60 2-2-2000 # sum of amount of app_id=1 and app_id=2
3 110 2-2-2000 # sum of amount of app_id=1 and app_id=2 and app_id=3