Query editor
with date_period as (SELECT * FROM (SELECT distinct date_trunc('week', block_time) as dt FROM tornado_cash.deposits) aCROSS JOIN (SELECT distinct blockchain FROM tornado_cash.deposits) b), tmp as (selectdate_trunc('week', block_time) as dt,blockchain,count(*) as txsfrom tornado_cash.depositsgroup by 1, 2)select*,sum(coalesce(txs, 0)) over(partition by blockchain order by dt asc) as total_txs-- sum(amout) over(partition by blockchain order by dt asc) as total_amountfrom (select * from date_period left join tmp using(dt, blockchain))order by dt desc