Query editor
WITH-- Combine transaction details from multiple sourcestxs AS (-- Fetch ERC20 transfers from EthereumSELECTt.evt_block_time AS block_time,t.evt_block_number AS block_number,t.evt_tx_hash as tx_hash,t."from",t."to",e.symbol AS symbol,t.value / POW(10, e.decimals) AS token_amount,'ethereum' AS chainFROMerc20_ethereum.evt_Transfer tLEFT JOIN tokens_ethereum.erc20 e ON t.contract_address = e.contract_addressWHEREt."from" IN ({{wallet_list}})OR t."to" IN ({{wallet_list}})UNION-- Fetch Ethereum transactionsSELECTblock_time,block_number,hash as tx_hash,"from","to",'ETH' AS symbol,value / 1e18 AS token_amount,'ethereum' AS chainFROMethereum.transactionsWHERE"from" IN ({{wallet_list}})OR "to" IN ({{wallet_list}})UNION-- Fetch ERC20 transfers from OptimismSELECTt.evt_block_time AS block_time,t.evt_block_number AS block_number,t.evt_tx_hash as tx_hash,t."from",t."to",e.symbol AS symbol,t.value / POW(10, e.decimals) AS token_amount,'optimism' AS chainFROMerc20_optimism.evt_Transfer tLEFT JOIN tokens_optimism.erc20 e ON t.contract_address = e.contract_addressWHEREt."from" IN ({{wallet_list}})OR t."to" IN ({{wallet_list}})UNION-- Fetch Optimism transactionsSELECTblock_time,block_number,hash as tx_hash,"from","to",