Query editor
WITH all_logs AS (-- EthereumSELECT distinct'ethereum' AS chain,logs.tx_hash,-- logs.topic1 as request_hash,txns.block_time AS date_time,-- logs.contract_address,txns.to as tx_solver,txns."from" as tx_from,txns.value-- logs.topic0,-- logs.dataFROM ethereum.logs logsJOIN ethereum.transactions txns ON logs.tx_hash = txns.hashWHERE logs.contract_address IN (0xF5042e6ffaC5a625D4E7848e0b01373D8eB9e222)and topic0 in (0x93485dcd31a905e3ffd7b012abe3438fa8fa77f98ddc9f50e879d3fa7ccdc324, 0xd35467972d1fda5b63c735f59d3974fa51785a41a92aa3ed1b70832836f8dba6)and DATE_TRUNC('day', txns.block_time) >= CURRENT_DATE - INTERVAL '{{#days data}}' DAYand txns.success = true-- and txns.value <> 0UNION ALL-- optimismSELECT distinct'optimism' AS chain,logs.tx_hash,-- logs.topic1 as request_hash,txns.block_time AS date_time,-- logs.contract_address,txns.to as tx_solver,txns."from" as tx_from,txns.value-- logs.topic0,-- logs.dataFROM optimism.logs logsJOIN optimism.transactions txns ON logs.tx_hash = txns.hashWHERE logs.contract_address IN (0xF5042e6ffaC5a625D4E7848e0b01373D8eB9e222)and topic0 in (0x93485dcd31a905e3ffd7b012abe3438fa8fa77f98ddc9f50e879d3fa7ccdc324, 0xd35467972d1fda5b63c735f59d3974fa51785a41a92aa3ed1b70832836f8dba6)and DATE_TRUNC('day', txns.block_time) >= CURRENT_DATE - INTERVAL '{{#days data}}' DAYand txns.success = true-- and txns.value <> 0UNION ALL-- baseSELECT distinct'base' AS chain,logs.tx_hash,-- logs.topic1 as request_hash,txns.block_time AS date_time,-- logs.contract_address,txns.to as tx_solver,txns."from" as tx_from,txns.value-- logs.topic0,