Query editor
select'Buy' as trade_type,count(*) as trade_count,round(sum(amount_usd), 2) as volume_usdfrom dex.tradeswhere blockchain = 'base'and token_bought_address = {{contract_address}}and amount_usd > 0and token_bought_amount > 0union allselect'Sell' as trade_type,count(*) as trade_count,round(sum(amount_usd), 2) as volume_usdfrom dex.tradeswhere blockchain = 'base'and token_sold_address = {{contract_address}}and amount_usd > 0and token_sold_amount > 0