Query editor
selectdate_trunc('month', block_time) as time, count(distinct tx_hash) as unique_tx,sum(case when project = 'uniswap' and version = '2' then amount_usd else 0 end) as uniswap_v2,sum(case when project = 'uniswap' and version = '3' then amount_usd else 0 end) as uniswap_v3,sum(case when project = 'sushiswap' then amount_usd else 0 end) as sushiswap,sum(case when project = 'balancer' then amount_usd else 0 end) as balancer,sum(case when project = 'pancakeswap' and version = '3' then amount_usd else 0 end) as pancakeswap,sum(case when project not in ('sushiswap', 'uniswap', 'balancer', 'pancakeswap') then amount_usd else 0 end) as other,sum(amount_usd) as total_usd_volumefrom dex.tradeswhere blockchain = 'ethereum' and block_time > now() - interval '360' dayand ((token_bought_symbol = 'ankrETH') or (token_sold_symbol = 'ankrETH'))group by 1order by 1 desc