Query editor
select date_trunc('week', block_date) as week, case when (project='balancer') then 'Balancer' else 'Others' end as project, sum(amount_usd) as volumefrom dex.tradeswhere 1=1and tx_to = 0xad3b67bca8935cb510c8d18bd45f0b94f54a968f -- Fusionand block_date > now() - interval '6' monthand token_pair = case when '{{pair}}' = 'all' then token_pair else '{{pair}}' endand ('{{blockchain}}' = 'all' OR blockchain = '{{blockchain}}')group by 1, 2