Query editor
withbsc_usd_deposits as(SELECT "from" as user, sum(value)/1e18 as amount_depositedFROM erc20_bnb.evt_transferWHERE contract_address = 0x55d398326f99059fF775485246999027B3197955AND to = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8GROUP BY 1), bnb_deposits as (select "from" as user, sum(value*p.price)/10e17 as amount_depositedfrom bnb.transactions bleft join prices.usd pon date_trunc('minute', b.block_time) = p.minutewhere b."to" = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8and p.contract_address = 0xbb4CdB9CBd36B01bD1cBaEBF2De08d9173bc095cgroup by 1), eth_usd_deposits as(select "from" as user, sum(value)/10e5 as amount_depositedfrom erc20_ethereum.evt_Transferwhere to = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8and contract_address in (0xdAC17F958D2ee523a2206206994597C13D831ec7, 0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48) -- usdc & usdtgroup by 1), eth_deposits as (select "from" as user, sum(e.value*p.price)/10e17 as amount_depositedfrom ethereum.transactions eleft join prices.usd pon date_trunc('minute', e.block_time) = p.minutewhere e."to" = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8and p.contract_address = 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2group by 1), polygon_usd_deposits as(select "from" as user, sum(value)/10e5 as amount_depositedfrom erc20_polygon.evt_transferwhere to = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8and contract_address = 0xc2132D05D31c914a87C6611C10748AEb04B58e8Fgroup by 1), polygon_deposits as (select "from" as user, sum(value*p.price)/10e17 as amount_depositedfrom polygon.transactions ptleft join prices.usd pon date_trunc('minute', pt.block_time) = p.minutewhere pt."to" = 0xDFaa75323fB721e5f29D43859390f62Cc4B600b8and p.contract_address = 0x0000000000000000000000000000000000001010group by 1), combined as (select * from bsc_usd_depositsunionselect * from eth_usd_depositsunionselect * from polygon_usd_depositsunion