hessTotal vThor (Share)
    Updated 2024-10-06
    select 'Deposit' as type,
    count(DISTINCT tx_hash) as txns,
    count(DISTINCT from_address) as users,
    sum(amount) as amount,
    sum(amount_usd) as amount_usd,
    avg(amount_usd) as avg_usd,
    max(amount_usd) as max_usd,
    median(amount_usd) as median_usd
    from ethereum.core.ez_token_transfers
    where contract_address = lower('0xa5f2211b9b8170f694421f2046281775e8468044')
    and to_address = lower('0x815c23eca83261b6ec689b60cc4a58b54bc24d8d')
    group by 1
    UNION all
    select 'Withdraw (Redeem)' as type,
    count(DISTINCT tx_hash) as txns,
    count(DISTINCT to_address) as users,
    sum(amount) as amount,
    sum(amount_usd) as amount_usd,
    avg(amount_usd) as avg_usd,
    max(amount_usd) as max_usd,
    median(amount_usd) as median_usd
    from ethereum.core.ez_token_transfers
    where contract_address = lower('0xa5f2211b9b8170f694421f2046281775e8468044')
    and from_address = lower('0x815c23eca83261b6ec689b60cc4a58b54bc24d8d')
    and origin_to_address = lower('0x815c23eca83261b6ec689b60cc4a58b54bc24d8d')
    and tx_hash in (select DISTINCT tx_hash from ethereum.core.ez_token_transfers
    where contract_address = lower('0x815c23eca83261b6ec689b60cc4a58b54bc24d8d')
    and to_address = '0x0000000000000000000000000000000000000000')
    group by 1
    QueryRunArchived: QueryRun has been archived