RamaharOsmosis 362 Governance
    Updated 2022-11-23
    with validators_data as (
    select
    raw_metadata[0]:"account_address"::string as validator_address
    from osmosis.core.dim_labels
    where label_subtype = 'validator')

    select
    'Non-Validator Voters' as users_type,
    count (distinct tx_id) as votes
    from osmosis.core.fact_governance_votes
    where proposal_id in ('362')
    and tx_status = 'SUCCEEDED'
    and voter not in (select validator_address from validators_data)

    union ALL

    select
    'Validator Voters' as users_type,
    count (distinct tx_id) as votes
    from osmosis.core.fact_governance_votes
    where proposal_id in ('362') and tx_status = 'SUCCEEDED'
    and voter in (select validator_address from validators_data)

    Run a query to Download Data