Updated 2022-11-23
    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 avg(balance/pow(10,decimal)) as OSMO_Balance
    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)


    Run a query to Download Data