Query editor
WITH volumes AS (-- Bought volumeSELECTtoken_bought_address AS token_address,token_bought_symbol AS symbol,amount_usdFROM dex.tradesWHERE blockchain = 'ethereum'AND block_date between date_trunc('day', now() - interval '7' day) and date_trunc('day', now() - interval '1' day)UNION ALL-- Sold volumeSELECTtoken_sold_address AS token_address,token_sold_symbol AS symbol,amount_usdFROM dex.tradesWHERE blockchain = 'ethereum'AND block_date between date_trunc('day', now() - interval '7' day) and date_trunc('day', now() - interval '1' day))SELECTtoken_address,MAX(symbol) AS token_symbol,SUM(amount_usd) AS total_volume_usdFROM volumesWHERE amount_usd IS NOT NULLGROUP BY 1ORDER BY total_volume_usd DESCLIMIT 10