Query editor
WITH all_deposits AS (SELECTblock_time AS deposit_time,currency_symbol,blockchain,tornado_version,contract_address,amount,ROW_NUMBER() OVER (PARTITION BY contract_address, amount ORDER BY block_time) AS deposit_indexFROM (SELECT*FROM tornado_cash.depositsUNION ALLSELECT*FROM tornado_cash_ethereum.depositsUNION ALLSELECT*FROM tornado_cash_bnb.depositsUNION ALLSELECT*FROM tornado_cash_avalanche_c.depositsUNION ALLSELECT*FROM tornado_cash_polygon.depositsUNION ALLSELECT*FROM tornado_cash_gnosis.depositsUNION ALLSELECT*FROM tornado_cash_optimism.depositsUNION ALLSELECT*FROM tornado_cash_arbitrum.deposits) AS d), all_withdrawals AS (SELECTblock_time AS withdrawal_time,currency_symbol,blockchain,tornado_version,contract_address,amount,ROW_NUMBER() OVER (PARTITION BY contract_address, amount ORDER BY block_time) AS withdrawal_indexFROM (SELECT*FROM tornado_cash.withdrawalsUNION ALLSELECT*FROM tornado_cash_ethereum.withdrawalsUNION ALL