Query editor
selectdate_trunc('day',block_time) as day,sum(amount_usd) as total_vol,sum(case when token_sold_symbol='X7R' then amount_usd else 0 end) as sold_amt,sum(case when token_bought_symbol='X7R' then amount_usd else 0 end) as bought_amtfrom dex.tradeswhere (token_bought_address=0x70008f18fc58928dce982b0a69c2c21ff80dca54 OR token_sold_address=0x70008f18fc58928dce982b0a69c2c21ff80dca54)and block_date >= date_trunc('day', now()-interval '30' day)and blockchain in (Select blockchain from unnest(split('{{blockchain}}',',')) as c(blockchain))group by date_trunc('day',block_time)