Query editor
/* WETHAddress: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 *//* UnibotV2Address: 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9 *//* UnibotV2DeploymentBlockNumber: 17464252 *//* UniswapV2PairAddress: 0x8dbee21e8586ee356130074aaa789c33159921ca *//* RevShareWallet: 0x3FC3549272a5ac9902F20c94bd68EE344eC94dc2 *//* TeamWallet: 0xDc3d4E12Ab9EEE060dC4De6b3D0b8Fbf129d7Dad *//* BotDeployerAddress: 0x40800a492a04Ae99c7fa6A0C2B52E3bEb6675A0D *//* BotDeployerFirstTransactionBlockNumber: 17300043 *//* BotDeployerFirstTransactionTimestamp: '2023-05-20 10:27:35.000 UTC' */WITHbotTradesWithFees AS (SELECTdate_trunc('day', block_time) AS block_date,blockchain,amount_usd,fee_usd,fee_token_amount,fee_token_symbol,type,--project_contract_address,user,tx_id AS tx_hashFROMdune.unibot.result_trojan_solana_cleaned_trades --query_3515962 -- Trojan Bot Trades--WHERE isLastTradeInTransaction = 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,SUM(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,COUNT(DISTINCT (botTradesWithFees.user)) AS numberOfUsers,COUNT(DISTINCT (IF(blockchain = 'Ethereum',botTradesWithFees.user,NULL))) AS ethereumNumberOfUsers,COUNT(DISTINCT (IF(blockchain = 'Solana',botTradesWithFees.user,NULL))) AS solanaNumberOfUsers,