select
date_trunc('day',block_timestamp) as date,
sum(fee) as daily_fee,
sum(daily_fee) over (order by date asc rows between unbounded preceding and current row) as total_fee
from flipside_prod_db.algorand.transactions
where BLOCK_TIMESTAMP >='2022-01-01'
group by 1