hessRegular Users Vs. Validators Votes
    Updated 2023-02-03
    with voter as ( select trunc(block_timestamp,'hour') as hourly,voter, proposal_id, vote_option, vote_weight
    from osmosis.core.fact_governance_votes
    where proposal_id = '{{Proposal_id}}')
    ,
    voters as ( select hourly, voter, description
    from voter a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
    )
    ,
    validator as ( select raw_metadata[0]:account_address as address
    from osmosis.core.dim_labels
    where label_subtype = 'validator' )

    select 'Validators' as type,description, count(DISTINCT(voter)) as total_voter
    from voters
    where voter in (select address from validator)
    group by 1,2
    UNION
    select 'Normal Users' as type,description, count(DISTINCT(voter)) as total_voter
    from voters
    where voter not in (select address from validator)
    group by 1,2
    Run a query to Download Data