Yousefi_1994 Governance Grind - Compare Daily Votes
Updated 2023-01-24
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 last_5_proposal as (
select
proposal_id
from terra.core.fact_governance_votes
group by proposal_id
order by proposal_id desc
limit 5
),
terra_validator_list as (
select
address,
label
from terra.core.dim_address_labels
where label_type = 'operator'
and label_subtype = 'validator'
),
governance_votes_transactions as (
select
tx_id,
block_timestamp,
voter,
proposal_id,
vote_option_text
from terra.core.fact_governance_votes
where tx_succeeded = true
)
select
block_timestamp::date as "Days",
case
when proposal_id in (select proposal_id from last_5_proposal) then 'Last 5 Proposal'
else 'Other Proposal'
end as "Type",
count(distinct tx_id) as "Number of Votes",
count(distinct voter) as "Number of Voters"
from governance_votes_transactions
Run a query to Download Data