I have a table trade as follows:-
bm | m | price | amount | total | status
USD | BTC | 0.01 | 1 | 0.01 | active
USD | BTC | 0.01 | 2.5 | 0.025 | active
USD | BTC | 0.4 | 0.5 | 0.020 | active
USD | BTC | 0.4 | 0.22 | 0.088 | active
I want to add amounts of duplicate price i.e 0.01 and 0.4 as well as total together in one output where status is active and show them so that the result is like:-
price | amount | total
0.01 | 3.5 | 0.035
0.4 | 0.722 | 0.108