cypherGoverning the Cosmos - votes per chain
Updated 2023-01-11
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 cosmos_daily_votes as (select
date_trunc('day', block_timestamp) as date,
count(distinct(tx_id)) as n_votes,
count(distinct(voter)) as n_voters,
replace(lower(description), ' ', '') as description,
'cosmos' as chain
from cosmos.core.fact_governance_votes v
left join cosmos.core.dim_vote_options o using (vote_option)
where date >= '2022-6-3'
group by date, description),
-- 2021-3-3
osmosis_daily_votes as (select
date_trunc('day', block_timestamp) as date,
count(distinct(tx_id)) as n_votes,
count(distinct(voter)) as n_voters,
replace(lower(description), ' ', '') as description,
'osmosis' as chain
from osmosis.core.fact_governance_votes v
left join osmosis.core.dim_vote_options o on v.vote_option = o.vote_id
where v.vote_option != 'VOTE_OPTION_UNSPECIFIED'
and date >= '2022-6-3'
group by date, description),
-- 2021-6-3
terra_daily_votes as (select
date_trunc('day', block_timestamp) as date,
count(distinct(tx_id)) as n_votes,
count(distinct(voter)) as n_voters,
lower(vote_option_text) as description,
'terra' as chain
from terra.core.fact_governance_votes
group by date, vote_option_text)
-- 2022-6-3
select * from cosmos_daily_votes
Run a query to Download Data