MostafaUntitled Query
    Updated 2023-09-05
    with wallet as (
    select USER_ADDRESS as address, CURRENT_BAL as balance
    from ethereum.core.ez_current_balances
    where CONTRACT_ADDRESS= lower ('0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce')
    and balance>0
    )
    SELECT 'Whale' as Class, count (case WHEN balance >= 1000000 then address END) as "Number of Addresses"
    from wallet
    UNION
    SELECT 'Octopus', count (case WHEN balance between 100000 and 1000000 then address END)
    from wallet
    UNION
    SELECT 'Dolphin', count (case WHEN balance between 10000 and 100000 then address END)
    from wallet
    UNION
    SELECT 'Shrimp', count (case WHEN balance between 100 and 10000 then address END)
    from wallet
    UNION
    SELECT 'Fish', count (case WHEN balance <= 100 then address END)
    from wallet

    Run a query to Download Data