Query editor
-- Find addresses that:-- 1. Made deposits up to Jan 26, 2025-- 2. Withdrew all funds (zero balance) by Jan 27, 2025-- 3. Never deposited again after Jan 26, 2025-- Including the assets/tokens depositedWITH target_contracts AS (SELECT contract_address FROM (VALUES(from_hex('594380c06552a4136e2601f89e50b3b9ad17bd4d')),(from_hex('544f45485418341c1a2b3a44404f12302277fffc')),(from_hex('9c0823d3a1172f9ddf672d438dec79c39a64f448')),(from_hex('b09a50acfff7d12b7a3def3d1027bc149bad1c')),(from_hex('52cb8a621610cc3ccf498a1981a8ae7ad6b8ab2a')),(from_hex('940750a267c64f3bbce31b948b67cd168f0843fa')),(from_hex('21dbba985eea6ba7f27534a72ccb292eba1d2c7c')),(from_hex('971e5b5d4baa5607863f3748febf287c7bf82618')),(from_hex('0c969cec0729487d264716e55f232b404299032c')),(from_hex('e39b5f5638a209c1a6b6cdffe5d37f7ac99fcc84')),(from_hex('19d0d8e6294b7a04a2733fe433444704b791939a')),(from_hex('bdea8e677f9f7c294a4556005c640ee505be6925')),(from_hex('03bf48b8a1b37fbead1ecabcf15b98b924ffa5ac')),(from_hex('5198cb44d7b2e993ebdda9cad3b9a0eaa32769d2')),(from_hex('475d3eb031d250070b63fa145f0fcfc5d97c304a')),(from_hex('422f5accc812c396600010f224b320a743695f85')),(from_hex('b26ff591f44b04e78de18f43b46f8b70c6676984')),(from_hex('38b86004842d3fa4596f0b7a0b53de90745ab654')),(from_hex('c329400492c6ff2438472d4651ad17389fcb843a'))) AS contracts(contract_address)),-- Get all transfers involving target contracts and user addressesall_transfers AS (SELECTCASEWHEN t."to" IN (SELECT contract_address FROM target_contracts) THEN t."from" -- Deposit: user -> contractWHEN t."from" IN (SELECT contract_address FROM target_contracts) THEN t."to" -- Withdrawal: contract -> userEND AS user_address,CASEWHEN t."to" IN (SELECT contract_address FROM target_contracts) THEN t."to" -- Deposit: contract receivingWHEN t."from" IN (SELECT contract_address FROM target_contracts) THEN t."from" -- Withdrawal: contract sendingEND AS target_contract_address,t.contract_address AS token_contract_address, -- The ERC20 token being transferredCASEWHEN t."to" IN (SELECT contract_address FROM target_contracts) THEN t.value -- Deposit: positive valueWHEN t."from" IN (SELECT contract_address FROM target_contracts) THEN -t.value -- Withdrawal: negative valueEND AS net_value,t.evt_block_timeFROM erc20_ethereum.evt_transfer AS tWHERE(t."to" IN (SELECT contract_address FROM target_contracts) ORt."from" IN (SELECT contract_address FROM target_contracts))AND t."from" != from_hex('0000000000000000000000000000000000000000') -- Exclude zero addressAND t."to" != from_hex('0000000000000000000000000000000000000000') -- Exclude zero address),-- Calculate balances by Jan 26 end and ensure they had depositsbalances_by_jan26 AS (SELECTuser_address,