在mysqli中添加所有重复值

I have an tabel trade as following:-

 bm | m | price | amount | status
 USD|BTC| 0.01  | 1      | active
 USD|BTC| 0.01  | 2.5    | active
 USD|BTC| 0.4   | 0.5    | active
 USD|BTC| 0.4   | 0.22   | active

I want to add amounts of duplicate price i.e 0.01 and 0.4 where status is active and show them so that the result is like:-

 price | amount
 0.01  | 3.5
 0.4   | 0.722

I have tried an php query for showing but it shows values and rows as it is. Help please.

Simply do a GROUP BY, use SUM() to calculate the sum for each price!

select price, sum(amount)
from tablename
WHERE bm = 'usd' and m = 'btc' 
group by price