Query editor
with x as (SELECTdt,casewhen lower(symbol) in ('weth') then 'eth'-- when lower(symbol) in ('wsteth','reth','cbeth') then 'lst'when lower(symbol) in ('usdc','frax','usdt','dai','lusd','crvusd') then 'stable'else 'vol' end as asset_category,amt_usdFROM query_3328811), x_grouped as (SELECT dt, asset_category, sum(amt_usd) as amt_usdFROM xGROUP BY dt, asset_category)SELECT dt, asset_category,amt_usd,sum(amt_usd) over(partition by asset_category order by dt) as rolling_revenueFROM x_grouped