Query editor
with daily as (selectblock_date,-- project,-- version,case when token_sold_address = 0x2dD087589ce9C5b2D1b42e20d2519B3c8cF022b7 -- NZDD token contractthen 'selling swap' else 'buying swap' end as direction,sum(amount_usd) as volume,count(distinct tx_hash) as swapsfrom dex.tradeswhere-- block_month >= date('2025-04-01')-- andblockchain = 'base'and (token_bought_address = 0x2dD087589ce9C5b2D1b42e20d2519B3c8cF022b7or token_sold_address = 0x2dD087589ce9C5b2D1b42e20d2519B3c8cF022b7)group by 1,2)select*, sum(volume) over (order by block_date) as cumulative_volume, sum(swaps) over (order by block_date) as cumulative_swapsfrom dailygroup by 1,2,3,4order by 1 desc