Query editor
-- select name, namespace, address, created_at-- from arbitrum.contracts where address = 0xC67E9Efdb8a66A4B91b1f3731C75F500130373A4-- select * from evms.contracts where namespace = 'hyperliquid'withbase_usdce_transactions as(select *, case when contract_address = 0xff970a61a04b1ca14834a43f5de4533ebddb5cc8 then 'USDC.e' else 'USDC' end as token_namefrom erc20_arbitrum.evt_Transferwhere contract_address in (0xff970a61a04b1ca14834a43f5de4533ebddb5cc8, 0xaf88d065e77c8cC2239327C5EDb3A432268e5831)),base_deposits as(select"from" as wallet_address,sum(cast(value as DOUBLE))/1e6 as deposit_quantity,sum(case when token_name = 'USDC.e' then cast(value as DOUBLE) end)/1e6 as eusdc_deposit_quantity,sum(case when token_name = 'USDC' then cast(value as DOUBLE) end)/1e6 as usdc_deposit_quantity,min(evt_block_time) as first_deposit_at,max(evt_block_time) as recent_deposit_atfrom base_usdce_transactionswhere "to" = 0xc67e9efdb8a66a4b91b1f3731c75f500130373a4 or "to" = 0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7group by 1),base_withdrawals as(select"to" as wallet_address,sum(cast(value as DOUBLE))/1e6 as withdraw_quantity,sum(case when token_name = 'USDC.e' then cast(value as DOUBLE) end)/1e6 as eusdc_withdrawal_quantity,sum(case when token_name = 'USDC' then cast(value as DOUBLE) end)/1e6 as usdc_withdrawal_quantity,min(evt_block_time) as first_withdraw_at,max(evt_block_time) as recent_withdraw_atfrom base_usdce_transactionswhere "from" = 0xc67e9efdb8a66a4b91b1f3731c75f500130373a4 or "from" = 0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7group by 1),base_users as(select wallet_address from base_depositsunionselect wallet_address from base_withdrawals),base_summary as(selecta.wallet_address,coalesce(round(b.deposit_quantity,2),0) as deposit_quantity,coalesce(round(c.withdraw_quantity,2),0) as withdraw_quantity,coalesce(round(b.deposit_quantity,2),0) - coalesce(round(c.withdraw_quantity,2),0) as net_flow,coalesce(round(b.eusdc_deposit_quantity,2),0) as eusdc_deposit_quantity,coalesce(round(b.usdc_deposit_quantity,2),0) as usdc_deposit_quantity,coalesce(round(c.eusdc_withdrawal_quantity,2),0) as eusdc_withdrawal_quantity,coalesce(round(c.usdc_withdrawal_quantity,2),0) as usdc_withdrawal_quantity,b.first_deposit_at,b.recent_deposit_at,c.first_withdraw_at,c.recent_withdraw_atfrom base_users aleft join base_deposits b on a.wallet_address = b.wallet_address