Query editor
WITH daily AS (SELECTdate_trunc('day', d.block_time) AS period,d.blockchain,sum(d.amount_usd) AS daily_volume,count(d.tx_hash) AS daily_num_swaps,count(distinct d.tx_from) AS daily_unique_swap_addressesFROM dex.trades dWHERE project = 'uniswap'AND version = '4'AND block_date >= date('2025-01-21')GROUP BY date_trunc('day', d.block_time), d.blockchain),cumulative AS (SELECTperiod,blockchain,daily_volume,sum(daily_volume) OVER (PARTITION BY blockchain ORDER BY period) AS cumulative_volume,daily_num_swaps,sum(daily_num_swaps) OVER (PARTITION BY blockchain ORDER BY period) AS cumulative_num_swaps,daily_unique_swap_addresses,sum(daily_unique_swap_addresses) OVER (PARTITION BY blockchain ORDER BY period) AS cumulative_unique_swap_addressesFROM daily)SELECTblockchain,max(cumulative_volume) AS cumulative_volume,max(cumulative_num_swaps) AS cumulative_num_swaps,max(cumulative_unique_swap_addresses) AS cumulative_unique_swap_addressesFROM cumulativeGROUP BY blockchainORDER BY 2 DESC;