Query editor
/* WETHAddress: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 *//* BotDeployerAddress: 0xf414d478934c29d9a80244a3626c681a71e53bb2 *//* BotDeployerFirstTransactionBlockNumber: 17345515 *//* BotDeployerFirstTransactionTimestamp: '2023-05-26 00:00:00.000 UTC' */WITHbotTradesWithFees AS (SELECTdate_trunc('{{Chart Resolution}}', 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)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_c', amount_usd, 0)) AS avalancheVolumeUSD,SUM(IF(blockchain = 'bnb', amount_usd, 0)) AS bscVolumeUSD,SUM(IF(blockchain = 'sonic', amount_usd, 0)) AS sonicVolumeUSD,-- UsersCOUNT(DISTINCT (IF(blockchain = 'ethereum',botTradesWithFees.user,NULL))) AS ethereumNumberOfUsers,COUNT(DISTINCT (IF(