hbd1994User Tiers
    Updated 2025-02-11
    with base as (
    select
    case
    when to_address = '0x7fda203f6f77545548e984133be62693bcd61497' and from_address != '0x7fda203f6f77545548e984133be62693bcd61497' then 'Deposit'
    when to_address != '0x7fda203f6f77545548e984133be62693bcd61497' and from_address = '0x7fda203f6f77545548e984133be62693bcd61497' then 'Withdraw'
    end as action,
    case
    when to_address = '0x7fda203f6f77545548e984133be62693bcd61497' and from_address != '0x7fda203f6f77545548e984133be62693bcd61497' then AMOUNT_PRECISE
    when to_address != '0x7fda203f6f77545548e984133be62693bcd61497' and from_address = '0x7fda203f6f77545548e984133be62693bcd61497' then AMOUNT_PRECISE * (-1)
    end as volume,
    *
    from ethereum.core.ez_token_transfers
    where origin_to_address = '0x7fda203f6f77545548e984133be62693bcd61497'
    order by 1),

    users as (
    select
    origin_from_address as "User Address",
    zeroifnull(count(*)) as "Actions",
    zeroifnull(sum(case when action = 'Deposit' then 1 end)) as "Deposits",
    zeroifnull(sum(case when action = 'Withdraw' then 1 end)) as "Withdrawals",
    zeroifnull(sum(volume)) as "Net Deposit Volume",
    zeroifnull(sum(case when action = 'Deposit' then volume end)) as "Deposits Volume",
    zeroifnull(sum(case when action = 'Withdraw' then volume * (-1) end)) as "Withdrawals Volume"
    from base
    group by 1
    order by 5 desc)

    select
    case
    when "Net Deposit Volume" = 0 then 'a. Zero Net Deposit Volume'
    when "Net Deposit Volume" > 0 and "Net Deposit Volume" < 100 then 'b. < 100 $'
    when "Net Deposit Volume" >= 100 and "Net Deposit Volume" < 250 then 'c. 100-250 $'
    when "Net Deposit Volume" >= 250 and "Net Deposit Volume" < 500 then 'd. 250-500 $'
    when "Net Deposit Volume" >= 500 and "Net Deposit Volume" < 1000 then 'e. 500-1000 $'
    when "Net Deposit Volume" >= 1000 and "Net Deposit Volume" < 5000 then 'f. 1000-5000 $'
    Last run: about 2 months agoAuto-refreshes every 12 hours
    Net Deposit Level
    Number of Unique Users
    Total Net Deposit Volume by Each Level
    1
    a. Zero Net Deposit Volume17800
    2
    b. < 100 $191041657.09157
    3
    c. 100-250 $821117430.38114
    4
    d. 250-500 $398144496.81394
    5
    e. 500-1000 $331232581.48476
    6
    f. 1000-5000 $5261092981.55647
    7
    g. 5000-10000 $94703658.58081
    8
    h. > 10000 $13015838323.56883
    9
    10-0.0001
    9
    301B
    12s