MLDZMNusa5
    Updated 2023-02-28
    with t1 as (select
    distinct DEPOSITOR_ADDRESS as wallets
    from ethereum.aave.ez_deposits
    )


    select
    case
    when USD_VALUE_NOW < 10 then 'Amibs (under 10)'
    when USD_VALUE_NOW between 10 and 100 then 'Planktons (10-100)'
    when USD_VALUE_NOW between 100 and 1000 then 'Fishes(100-1000)'
    when USD_VALUE_NOW between 1000 and 10000 then 'Jelly-fishes(1k - 10k)'
    when USD_VALUE_NOW between 10000 and 100000 then 'Octopuses(10k - 100k)'
    when USD_VALUE_NOW between 100000 and 1000000 then 'Sharks(10k - 1M)'
    when USD_VALUE_NOW > 1000000 then 'Whale (over 1M)'
    end as tier ,
    count(distinct USER_ADDRESS) as wallets
    from ethereum.core.ez_current_balances
    where USER_ADDRESS in (select wallets from t1)
    group by 1 having tier is not null
    Run a query to Download Data