bachiosmo362-2
    Updated 2022-11-24
    with val_addresses as (
    select
    address
    from
    osmosis.core.dim_labels
    where
    label_subtype = 'validator'
    ),
    non_validators as (
    select
    'Regular Voters' as voter_catg,
    Concat(
    description, ' (', proposal_id, ' )'
    ) AS vote_desc,
    count (distinct tx_id) as Votes_Count
    from
    osmosis.core.fact_governance_votes
    LEFT OUTER JOIN osmosis.core.dim_vote_options ON vote_id = vote_option
    where
    proposal_id = '362'
    and tx_status = 'SUCCEEDED'
    and voter not in (
    select
    address
    from
    val_addresses
    )
    group by
    voter_catg,
    vote_desc
    ),
    validators as (
    select
    'Validator Voters' as voter_catg,
    Concat(
    description, ' (', proposal_id, ' )'
    Run a query to Download Data