mlhUntitled Query
    Updated 2022-11-25
    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 to 100 $OSMO'
    when (balance/pow(10,decimal)) >= 100 and (balance/pow(10,decimal)) < 1000 then '100 to 1K $OSMO'
    when (balance/pow(10,decimal)) >= 1000 and (balance/pow(10,decimal)) < 10000 then '1K to 10K $OSMO'
    else 'More than 10K $OSMO' end as balance,
    count (distinct address) as voters
    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 (select distinct a.voter,
    a.block_timestamp,
    a.tx_id,
    b.Description
    from osmosis.core.fact_governance_votes a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
    join (select voter,
    block_timestamp,
    tx_id,
    Description
    from osmosis.core.fact_governance_votes a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
    where proposal_id in ('362')
    and tx_status = 'SUCCEEDED'
    ) c on a.voter = c.voter and a.block_timestamp > c.block_timestamp and b.description != c.description
    where proposal_id in ('362')
    and tx_status = 'SUCCEEDED'
    )
    )
    group by 1
    Run a query to Download Data