faraz-Lvyyy8type of the balance in line
    Updated 2022-11-21
    with reference as (
    select
    balance/pow(10,decimal) AS BALANCE,
    count (distinct address) as user_number
    from osmosis.core.fact_daily_balances a
    join osmosis.core.fact_governance_votes b
    on a.ADDRESS = b.VOTER
    where currency = 'uosmo'
    and PROPOSAL_ID = 362
    group by 1
    order by 2 desc
    ),
    low_than_10 as (
    select
    sum(user_number)
    from REFERENCE
    where BALANCE < 10
    ),
    between_10_1000 as (
    select
    sum(user_number)
    from REFERENCE
    where BALANCE >= 10 and BALANCE < 1000
    ),
    between_1000_100K as (
    select
    sum(user_number)
    from REFERENCE
    where BALANCE >= 1000 and BALANCE < 100000
    ),
    more_than_100K as (
    select
    sum(user_number)
    from REFERENCE
    where BALANCE >= 100000
    )
    Run a query to Download Data