Query editor
withtoken_price as (select DISTINCTsymbol,price,minutefromprices.usd as pwhereminute = (selectmax(minute)fromprices.usd as p1wherep1.symbol = p.symbol)and symbol = 'USDC'and blockchain = 'ethereum'),allDate as (selectDATE_TRUNC('day', time) AS date_timefromarbitrum.blockswhere number >= 229317712GROUP by1),DFInDexTransaction as (selecta.block_time,BYTEARRAY_TO_UINT256 (data) / 1e6 as valuefromarbitrum.logs awherea.contract_address = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831and topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand from_hex(CONCAT('0x', SUBSTRING(TRY_CAST(topic2 AS VARCHAR), 27, 40))) in(0x6E8E50f884Ac7e7814A8B0F7d5478Adcf11f50A4)),DFOutDexTransaction as (selecta.block_time,BYTEARRAY_TO_UINT256 (data) / 1e6 as valuefromarbitrum.logs awherea.contract_address = 0xaf88d065e77c8cC2239327C5EDb3A432268e5831and topic0=0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3efand from_hex(CONCAT('0x', SUBSTRING(TRY_CAST(topic1 AS VARCHAR), 27, 40))) in(0x6E8E50f884Ac7e7814A8B0F7d5478Adcf11f50A4)),sUSXInDexTransaction as (selecta.block_time,