Query editor
WITH daily_swaps AS (SELECTDATE_TRUNC('day', block_time) AS date,COUNT(*) AS swap_count,COUNT(DISTINCT pool_address) AS active_pools,COUNT(DISTINCT initiator) AS unique_swappers,COUNT(DISTINCT CONCAT(CAST(tokenIn AS VARCHAR), '-', CAST(tokenOut AS VARCHAR))) AS unique_trading_pairsFROM dune.grassrootseconomics.result_pool_swapsGROUP BY DATE_TRUNC('day', block_time))SELECTdate,swap_count,active_pools,unique_swappers,unique_trading_pairs,SUM(swap_count) OVER (ORDER BY date) AS cumulative_swaps,SUM(unique_swappers) OVER (ORDER BY date) AS cumulative_swappersFROM daily_swapsORDER BY date