mlhAverage wallet size (in OSMO)
    Updated 2022-12-10
    select 'Average wallet size (in OSMO) of the people who have changed their vote more than once' as type,
    avg (balance/pow(10,decimal)) as OSMO_bal
    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 a.voter,
    count (distinct a.tx_id) as votes_count
    from (select distinct a.voter,
    a.block_timestamp,
    a.tx_id,
    b.vote_option
    from osmosis.core.fact_governance_votes a join (select a.voter,
    minvote1,
    vote_option
    from osmosis.core.fact_governance_votes a join (select voter,
    min (block_timestamp) as minvote1
    from osmosis.core.fact_governance_votes
    where proposal_id in ('82')
    and tx_status = 'SUCCEEDED'
    group by 1
    ) b on a.voter = b.voter and a.block_timestamp = b.minvote1
    where proposal_id in ('82')
    and tx_status = 'SUCCEEDED'
    ) b on a.voter = b.voter and a.block_timestamp > b.minvote1 and a.vote_option != b.vote_option
    where proposal_id in ('82')
    and tx_status = 'SUCCEEDED'
    ) a
    group by 1
    having votes_count > 1
    )
    )

    UNION ALL
    Run a query to Download Data