Query editor
with aa as (select date_trunc('day',block_time)as day, ROUND(sum(amount_usd), 2) daily_volume, blockchain ,CASEWHEN block_time >= TIMESTAMP '2023-03-10 00:00 UTC' AND block_time <= TIMESTAMP '2023-03-13 00:00 UTC' THEN 'SVB shutdown'WHEN block_time < TIMESTAMP '2023-03-10 00:00 UTC' THEN 'Before SVB crash'ELSE 'After SVB shutdown'END AS Eventfrom dex.tradeswhere (token_bought_symbol = 'USDC'or token_sold_symbol = 'USDC')and block_time >= timestamp '2018-01-01 00:00 UTC'--and project = 'uniswap'group by 1,3,4order by 1)select * , ROUND(SUM(daily_volume) * 100 / SUM(daily_volume) OVER (order BY day), 2) AS daily_volume_percentagefrom aagroup by 1,2,3,4