Query editor
SELECTswap1.evt_block_time,swap1.evt_tx_hash as swap1_hash,tx.index as swap1_index,-- swap2.evt_tx_hash as swap2_hash,-- tx2.index as swap2_index,price_update.*,symbol,fastPrice / pow(10,decimals) as fastPrice,refPrice / pow(10,decimals) as refPriceFROM(SELECT DISTINCTpd.evt_tx_hash as hash,pd.evt_block_number as block_number,tx.index,token as token_address,fastPrice,refPriceFROM gmx_avalanche_c.FastPriceFeed_evt_PriceData pdINNER JOIN avalanche_c.transactions tx on tx.hash = pd.evt_tx_hash) price_updateINNER JOIN gmx_avalanche_c.Router_evt_Swap swap1 on swap1.evt_block_number = price_update.block_number --and (SELECT index FROM avalanche_c.transactions WHERE hash = swap1.evt_tx_hash) - 1 = tx.indexINNER JOIN avalanche_c.transactions tx on tx.hash = swap1.evt_tx_hashLEFT JOIN tokens.erc20 token on token.blockchain = 'avalanche_c' and token.contract_address = token_addressINNER JOIN gmx_avalanche_c.Router_evt_Swap swap2 on swap2.evt_block_number = price_update.block_number --and (SELECT index FROM avalanche_c.transactions WHERE hash = swap1.evt_tx_hash) - 1 = tx.indexINNER JOIN avalanche_c.transactions tx2 on tx2.hash = swap2.evt_tx_hashWHERE tx.index != tx2.index--WHERE tx.index > price_update.index