with voters_data as(
select voter, label,
-- count (distinct tx_id) as transactions_count
count (distinct vote_option) as vote_options_count
from osmosis.core.fact_governance_votes votes join (select address,
label,
raw_metadata[0]['account_address']::string as account,
raw_metadata[0]['rank']::string as range,
raw_metadata[0]['uptime']['address']::string as uptime_address
from osmosis.core.dim_labels
where label_subtype = 'validator') validators on votes.voter = validators.account
where proposal_id in ('362')
and tx_status = 'SUCCEEDED'
group by voter, label
order by vote_options_count DESC
limit 10
)
select * from voters_data