Query editor
with trade as (selectcase when lower(project) in ('bisonfi','humidifi','solfi','tessera','alphaq','goonfi','zerofi','obric','aquifer') then 'propAMM'else 'other DEX'end as segment,date_trunc('week',block_date) as ds,tx_id,token_pair,amount_usdfrom dex_solana.tradeswhereblock_date >= timestamp '2025-01-01' andtoken_bought_symbol in ('USDT', 'USDC', 'USD1', 'JUPUSD') and token_sold_symbol in ('USDT', 'USDC', 'USD1', 'JUPUSD'))selectds,segment,sum(amount_usd) as volume_usdfrom tradegroup by 1,2