Query editor
/* Error: Unable to fully debug query */WITH avalanche_sends AS (SELECTcall_block_time AS message_time,call_tx_hash AS message_tx,_dstChainId AS destination_chain_id,_destination AS destination_address,_payload AS payloadFROM layerzero_avalanche_c.Endpoint_call_sendWHEREcall_block_time >= TRY_CAST('2024-01-01' AS TIMESTAMP)AND call_block_time < CURRENT_TIMESTAMPAND call_success = TRUEAND _dstChainId = 101 /* Filter for transactions to Ethereum */), ethereum_receives AS (SELECTevt_block_time AS execution_time,evt_tx_hash AS execution_tx,srcChainId,srcAddress,dstAddress,payloadFROM layerzero_ethereum.endpoint_evt_PayloadStoredWHEREevt_block_time >= TRY_CAST('2024-01-01' AS TIMESTAMP)AND evt_block_time < CURRENT_TIMESTAMPAND srcChainId = 106 /* Filter for transactions from Avalanche */)SELECTav_sends.message_time,av_sends.message_tx,er.execution_time,er.execution_tx,av_sends.destination_chain_id,av_sends.destination_address,er.srcChainId,er.srcAddress,er.dstAddress,(TRY_CAST(TO_UNIXTIME(er.execution_time) AS BIGINT) - TRY_CAST(TO_UNIXTIME(av_sends.message_time) AS BIGINT)) AS latency_secondsFROM avalanche_sends AS av_sendsJOIN ethereum_receives AS erON SUBSTRING(TRY_CAST(av_sends.payload AS VARCHAR), 1, 32) = SUBSTRING(TRY_CAST(er.payload AS VARCHAR), 1, 32)AND er.execution_time > av_sends.message_timeAND er.execution_time <= av_sends.message_time + INTERVAL '1' HOURWHERE(TRY_CAST(TO_UNIXTIME(er.execution_time) AS BIGINT) - TRY_CAST(TO_UNIXTIME(av_sends.message_time) AS BIGINT)) > 0AND (TRY_CAST(TO_UNIXTIME(er.execution_time) AS BIGINT) - TRY_CAST(TO_UNIXTIME(av_sends.message_time) AS BIGINT)) <= 3600 /* Max 1 hour latency */ORDER BYav_sends.message_time DESCLIMIT 50-- WITH avalanche_sends AS (-- SELECT