Query editor
WITH lp_addresses AS (SELECT * FROM query_4703517),combined_logs AS (SELECTblock_time, block_number,la.underlying_address,contract_address,topic0, topic1,topic2, topic3, data,tx_hash, index,block_date,tx_from, tx_to,'arbitrum' as chain_nameFROM arbitrum.logs lJOIN lp_addresses la ON la.chain_name = 'arbitrum'AND l.block_number >= la.start_blockAND l.contract_address = la.lp_addressUNION ALLSELECTblock_time, block_number,la.underlying_address,contract_address,topic0, topic1,topic2, topic3, data,tx_hash, index,block_date,tx_from, tx_to,'ethereum' as chain_nameFROM ethereum.logs lJOIN lp_addresses la ON la.chain_name = 'ethereum'AND l.block_number >= la.start_blockAND l.contract_address = la.lp_addressUNION ALLSELECTblock_time, block_number,la.underlying_address,contract_address,topic0, topic1,topic2, topic3, data,tx_hash, index,block_date,tx_from, tx_to,'bnb' as chain_nameFROM bnb.logs lJOIN lp_addresses la ON la.chain_name = 'bnb'AND l.block_number >= la.start_blockAND l.contract_address = la.lp_address),all_events AS (SELECTblock_time,chain_name,underlying_address,contract_address,underlyingAmount as token_amount,'SharesMinted' as event_type,tx_hash,indexFROM