roketos24
    Updated 2022-11-20
    with voterst as (
    select voter,
    count (distinct tx_id) as votes_count,
    count (distinct vote_option) as Options_count
    from osmosis.core.fact_governance_votes
    where tx_status = 'SUCCEEDED'
    and proposal_id in ('362')
    group by 1)

    select case when (balance/pow(10,decimal)) < 10 then 'Less Than 10 $OSMO'
    when (balance/pow(10,decimal)) >= 10 and (balance/pow(10,decimal)) < 100 then '10 - 100 $OSMO'
    when (balance/pow(10,decimal)) >= 100 and (balance/pow(10,decimal)) < 1000 then '100 - 1000 $OSMO'
    when (balance/pow(10,decimal)) >= 1000 and (balance/pow(10,decimal)) < 10000 then '1000 - 10000 $OSMO'
    else 'More Than 10000 $OSMO' end as type,
    count (distinct address) as Users_Count
    from osmosis.core.fact_daily_balances
    where currency = 'uosmo'
    and date = (select max(date) from osmosis.core.fact_daily_balances)
    and address in (select voter from voterst)
    group by 1
    order by 2 desc
    Run a query to Download Data