select
block_timestamp::date as date,
count(distinct tx_group_id) as n_sales,
sum(amount) as fee_paid,
sum(fee_paid) over (order by date asc rows between unbounded preceding and current row) as cum_fee_paid,
sum(n_sales) over (order by date asc rows between unbounded preceding and current row) as cum_n_sales
from algorand.payment_transaction
where
receiver = 'RANDGVRRYGVKI3WSDG6OGTZQ7MHDLIN5RYKJBABL46K5RQVHUFV3NY5DUE'
group by date