hessVote Options Of Validators and Normal Users
    Updated 2022-11-24
    with voter as ( select trunc(block_timestamp,'hour') as hourly,voter, proposal_id, vote_option, vote_weight
    from osmosis.core.fact_governance_votes
    where TX_STATUS = 'SUCCEEDED'
    and proposal_id = '362')
    ,
    voters as ( select hourly, voter, description
    from voter a join osmosis.core.dim_vote_options b on a.vote_option = b.vote_id
    where hourly::date >= CURRENT_DATE - 60)
    ,
    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