cypherGoverning the Cosmos - avg vote distribution - terra
Updated 2023-01-12
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with terra_votes as (select
proposal_id,
vote_option_text,
count(distinct(tx_id)) as n_amount_votes
from terra.core.fact_governance_votes
group by proposal_id, vote_option_text),
terra_avg as (select
vote_option_text as vote,
round(avg(n_amount_votes),0) as avg_votes,
'terra' as chain
from terra_votes
group by vote)
select * from terra_avg
-- cosmos_votes as (select
-- proposal_id,
-- count(distinct(tx_id)) as n_amount_votes
-- from cosmos.core.fact_governance_votes
-- group by proposal_id
-- ),
-- cosmos_avg as (select
-- avg(n_amount_votes) as avg_votes,
-- median(n_amount_votes) as median_votes,
-- 'cosmos' as chain
-- from cosmos_votes
-- ),
-- osmosis_votes as (select
-- proposal_id,
-- count(distinct(tx_id)) as n_votes
-- from osmosis.core.fact_governance_votes v
-- where v.vote_option != 'VOTE_OPTION_UNSPECIFIED'
-- group by proposal_id),
Run a query to Download Data