Query editor
with dex_trade as (select date_trunc('week', block_time) as time, token_bought_amount as bnb_amount, token_sold_amount as ankrBNB_amount, amount_usd, projectfrom dex.tradeswhere blockchain = 'bnb'and token_bought_address = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c -- WBNB token contractand token_sold_address = 0x52F24a5e03aee338Da5fd9Df68D2b6FAe1178827-- ankrBNB token contractunion allselect date_trunc('week', block_time) as time, token_sold_amount as bnb_amount, token_bought_amount as ankrBNB_amount, amount_usd, projectfrom dex.tradeswhere blockchain = 'bnb'and token_sold_address = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095c -- WBNB token contractand token_bought_address = 0x52F24a5e03aee338Da5fd9Df68D2b6FAe1178827-- ankrBNB token contract)select time, sum(bnb_amount) as bnb_amount, sum(amount_usd) as usd_amount, projectfrom dex_tradegroup by time,projectorder by time desc