Query editor
with base as (selectblock_time,blockchain,--project,case when token_pair= 'ETH-USDC' then 'USDC-WETH'when token_pair = 'ETH-USDC.e' then 'USDC-WETH'when token_pair = 'ETH-USDT' then 'USDT-WETH'when token_pair = 'USDC.e-WETH' then 'USDC-WETH'when token_pair = 'USDbC-WETH' then 'USDC-WETH'when token_pair = 'ETH-USDbC' then 'USDC-WETH'when token_pair = 'PEPE-ETH' then 'PEPE-WETH'when token_pair = 'ETH-pepecoin' then 'PEPE-WETH'when token_pair = 'ETH-PEPECOIN' then 'PEPE-WETH'when token_pair = 'APU-ETH' then 'APU-WETH'else token_pairend as token_pair,amount_usdfrom dex.tradeswhere blockchain = 'ethereum'and project not in ('1inch-LOP','0x-API')and tx_hash not in (select evt_tx_hash from uniswap_ethereum.ExclusiveDutchOrderReactor_evt_Fill)and tx_hash not in (select evt_tx_hash from uniswap_ethereum.V2DutchOrderReactor_evt_Fill)and block_time > now() - interval '180' day)selectdate_trunc('day', block_time) as evt_day,token_pair,sum(amount_usd) as usd_volumefrom basewhere token_pair in ('USDC-WETH', 'PEPE-WETH', 'APU-WETH')group by 1,2order by 1