with fee_transaction as (
select
block_timestamp,
amount
from algorand.payment_transaction
where receiver = 'MTMJ5ADRK3CFG3HGUI7FS4Y55WGCUO5CRUMVNBZ7FW5IIG6T3IU2VJHUMM'
and amount is not null
)
select
date_trunc('day', block_timestamp) as time,
sum(amount) as daily_amount,
sum(daily_amount) over (order by time) as total_fees
from fee_transaction
group by 1