Query editor
with all_tx AS (SELECTDATE_TRUNC('week', block_time) AS day,amount_usd,tx_from,tx_hashFROM dex.tradesWHERE blockchain = 'polygon'AND (token_sold_address = 0xA04C86c411320444d4A99d44082e057772E8cF96OR token_bought_address = 0xA04C86c411320444d4A99d44082e057772E8cF96)-- LIMIT 50)SELECTday,SUM(amount_usd) AS trade_vol,COUNT(DISTINCT tx_hash) AS num_trades,COUNT(tx_from) AS num_traders,(SELECT SUM(amount_usd) FROM all_tx) AS total_trade_vol,(SELECT COUNT(DISTINCT tx_from) FROM all_tx) AS total_num_traders,(SELECT COUNT(DISTINCT tx_hash) FROM all_tx) AS total_num_tradesFROM all_txGROUP BY 1ORDER BY 1 DESC