Updated 2023-01-08
    with buyers as (
    select seller_address
    FROM ethereum.core.ez_nft_sales
    where EVENT_TYPE = 'sale' and CURRENCY_SYMBOL = 'ETH' and lower(NFT_ADDRESS) = lower('0x8a90CAb2b38dba80c64b7734e58Ee1dB38B8992e')
    and price>0
    ),

    table1 as (select user_address, sum(CURRENT_BAL) as balance1
    from ethereum.core.ez_current_balances where user_address in (select seller_address from buyers)
    and LAST_ACTIVITY_BLOCK_TIMESTAMP in (select max(LAST_ACTIVITY_BLOCK_TIMESTAMP) from ethereum.core.ez_current_balances)
    and SYMBOL= 'ETH'
    group by 1
    )
    select case when balance1< 0.001 then 'Less Than 0.001 ETH'
    when balance1 >= 0.001 and balance1 < 0.01 then 'Between 0.001 and 0.01 ETH'
    when balance1 >= 0.01 and balance1 < 0.1 then 'Between 0.01 and 0.1 ETH'
    when balance1 >= 0.1 and balance1 < 1 then 'Between 0.1 and 1 ETH'
    when balance1 >= 1 and balance1 < 2 then 'Between 1 and 2 ETH'
    when balance1 >= 2 and balance1 < 5 then 'Between 2 and 5 ETH'
    else 'More Than 5 ETH' end as "name",
    count (distinct user_address) as "value"
    from table1 --where user_address in (select origin_from_address from buyers)
    group by 1

    Run a query to Download Data