Query editor
Withhyperliquid_depositors as (withbase_usdce_transactions as (select*,casewhen contract_address = 0xff970a61a04b1ca14834a43f5de4533ebddb5cc8 then 'USDC.e'else 'USDC'end as token_namefromerc20_arbitrum.evt_Transferwherecontract_address in (0xff970a61a04b1ca14834a43f5de4533ebddb5cc8,0xaf88d065e77c8cC2239327C5EDb3A432268e5831)),base_deposits as (select"from" as wallet_address,sum(cast(value as DOUBLE)) / 1e6 as deposit_quantity,sum(casewhen token_name = 'USDC.e' then cast(value as DOUBLE)end) / 1e6 as eusdc_deposit_quantity,sum(casewhen 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 last_deposit_atfrombase_usdce_transactionswhere"to" = 0xc67e9efdb8a66a4b91b1f3731c75f500130373a4or "to" = 0x2Df1c51E09aECF9cacB7bc98cB1742757f163dF7group by1),base_withdrawals as (select"to" as wallet_address,sum(cast(value as DOUBLE)) / 1e6 as withdraw_quantity,sum(casewhen token_name = 'USDC.e' then cast(value as DOUBLE)end) / 1e6 as eusdc_withdrawal_quantity,sum(casewhen 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 last_withdraw_atfrombase_usdce_transactions