Query editor
/* WETHAddress: 0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2 *//* UnibotV2Address: 0xf819d9cb1c2a819fd991781a822de3ca8607c3c9 *//* UnibotV2DeploymentBlockNumber: 17464252 *//* UnibotV2DeploymentTimestamp: '2023-06-12 13:23:59.000 UTC' *//* UniswapV2PairAddress: 0x8dbee21e8586ee356130074aaa789c33159921ca *//* RevShareWallet: 0x3FC3549272a5ac9902F20c94bd68EE344eC94dc2 *//* TeamWallet: 0xDc3d4E12Ab9EEE060dC4De6b3D0b8Fbf129d7Dad *//* BotDeployerAddress: 0x40800a492a04Ae99c7fa6A0C2B52E3bEb6675A0D *//* BotDeployerFirstTransactionBlockNumber: 17300043 *//* BotDeployerFirstTransactionTimestamp: '2023-05-20 10:27:35.000 UTC' */WITHtradesWithFees AS (SELECTblock_time,date_trunc('day', block_time) AS block_date,fee_usd,fee_token_amount,fee_token_symbolFROM/* Unibot Bot Trades */query_2640849WHEREisLastTradeInTransaction = true -- This prevents over counting for multi-hop trades and excludes tax distributions),tradesWithFeesByDay AS (SELECTblock_date,SUM(IF(fee_token_symbol = 'ETH', fee_token_amount, 0)) AS feesETH,SUM(IF(fee_token_symbol = 'SOL', fee_token_amount, 0)) AS feesSOLFROMtradesWithFeesGROUP BYblock_date),tradesWithFeesBeforeMigrationByDay AS (SELECTdate_trunc('day', block_time) as block_date,SUM(IF(fee_token_symbol = 'ETH', fee_token_amount, 0)) AS feesETHFROMtradesWithFeesWHERE/* UnibotV2DeploymentTimestamp */block_time < CAST('2023-06-12 13:23:59 UTC' AS TIMESTAMP)GROUP BYdate_trunc('day', block_time)),tradesWithFeesAfterMigrationByDay AS (SELECTblock_date,SUM(IF(fee_token_symbol = 'ETH', fee_token_amount, 0)) AS feesETHFROMtradesWithFeesWHERE/* UnibotV2DeploymentTimestamp */block_time >= CAST('2023-06-12 13:23:59 UTC' AS TIMESTAMP)GROUP BYblock_date),v1TaxDistributionsByDay AS (SELECT