Query editor
with volume_stats as (selectday, pool_label, pool_id, token_pair, project_contract_address, v.blockchain, daily_swaps,daily_volume_usd,coalesce(swap_fees_earned,0) as swap_fees_earned,cumulative_volume_usd,cumulative_swaps,cumulative_feesfrom query_3050831 v-- gyro volume stats mega sheet includes sonic eclpsjoin query_5296522 vo on v.project_contract_address = vo.pool_addressand v.blockchain = vo.blockchainwhere v.day > timestamp '2025-06-01')select *,sum(swap_fees_earned) over (partition by blockchain order by day) as cumulative_fees_by_chain,sum(swap_fees_earned) over (order by day) as total_fees,sum(coalesce(daily_volume_usd,0)) over (partition by blockchain order by day) as cumulative_volume_by_chain,sum(coalesce(daily_volume_usd,0)) over (order by day) as total_volume_over_timefrom volume_statswhere project_contract_address != 0x5256d61adf6cb3403984357a28ea87206b4cdb31 -- test poolorder by day desc