Query editor
WITHbotTradesWithFees AS (SELECTdate_trunc('day', block_time) AS block_date,type,blockchain,amount_usd,fee_usd,fee_token_amount,fee_token_symbol,--bribe_usd,--bribe_token_amount,--bribe_token_symbol,user,project_contract_address,tx_hashFROM/* Banana Gun Bot Trades */query_2683548WHEREisLastTradeInTransaction = true -- This prevents over counting for multi-hop trades and excludes tax distributions),firstUserOccurrences AS (SELECTuser,MIN(block_date) AS firstTradeDateFROMbotTradesWithFeesGROUP BYuser),query_new as(SELECTblock_date,SUM(amount_usd) AS totalVolumeUSD,COUNT(DISTINCT (botTradesWithFees.user)) AS numberOfUsers,COALESCE(COUNT(DISTINCT (firstUserOccurrences.user)), 0) AS numberOfNewUsers,-- VolumeSUM(IF(blockchain = 'Ethereum', amount_usd, 0)) AS ethereumVolumeUSD,SUM(IF(blockchain = 'Solana', amount_usd, 0)) AS solanaVolumeUSD,SUM(IF(blockchain = 'Base', amount_usd, 0)) AS baseVolumeUSD,SUM(IF(blockchain = 'Avalanche', amount_usd, 0)) AS avalancheVolumeUSD,SUM(IF(blockchain = 'BSC', amount_usd, 0)) AS bscVolumeUSD,-- UsersCOUNT(DISTINCT (IF(blockchain = 'Ethereum',botTradesWithFees.user,NULL))) AS ethereumNumberOfUsers,COUNT(DISTINCT (IF(blockchain = 'Solana',botTradesWithFees.user,NULL