Ali3NValidators Participation in Governance Votes (Cosmos Osmosis Terra)
Updated 2023-02-22Copy Reference Fork
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
›
⌄
with terravalidators as (
select REPLACE(ATTRIBUTE_VALUE, 'valoper', '') as validator_address1,
left(validator_address1, 38) as Account_address
from terra.core.fact_msg_attributes
where ATTRIBUTE_KEY= 'source_validator'
and tx_succeeded = 'TRUE')
select 'Cosmos' as chain,
count (distinct tx_id) as Votes_Count,
count (distinct account_address) as Voters_count,
count (distinct proposal_id) as Proposals_count
from cosmos.core.fact_governance_votes t1 join cosmos.core.fact_validators t2 on t1.voter = t2.account_address
where tx_succeeded = 'TRUE'
union ALL
select 'Osmosis' as chain,
count (distinct tx_id) as Votes_Count,
count (distinct account_address) as Voters_count,
count (distinct proposal_id) as Proposals_count
from osmosis.core.fact_governance_votes t1 join osmosis.core.fact_validators t2 on t1.voter = t2.account_address
where tx_succeeded = 'TRUE'
union ALL
select 'Terra' as chain,
count (distinct tx_id) as Votes_Count,
count (distinct Account_address) as Voters_count,
count (distinct proposal_id) as Proposals_count
from terra.core.fact_governance_votes t1 join terravalidators t2 on left(t1.voter, 38) = t2.Account_address
where tx_succeeded = 'TRUE'
Run a query to Download Data