mlhUntitled Query
Updated 2022-12-10Copy 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
32
33
34
35
36
›
⌄
select date_trunc('day', block_timestamp) as day,
'non validator voter' as type,
count (distinct tx_id) as votes,
count (distinct voter) as voters
from osmosis.core.fact_governance_votes
where proposal_id in ('82')
and tx_status = 'SUCCEEDED'
and voter not in (select Account_Address
from (select address as validator_address,
label as validator,
raw_metadata[0]['account_address']::string as Account_Address,
raw_metadata[0]['rank']::string as Rank,
raw_metadata[0]['uptime']['address']::string as Proposer
from osmosis.core.dim_labels
where label_subtype = 'validator'
)
) group by 1
union ALL
select date_trunc('day', block_timestamp) as day,
'validator voter' as type,
count (distinct tx_id) as votes,
count (distinct voter) as voters
from osmosis.core.fact_governance_votes
where proposal_id in ('82')
and tx_status = 'SUCCEEDED'
and voter in (select Account_Address
from (select address as validator_address,
label as validator,
raw_metadata[0]['account_address']::string as Account_Address,
raw_metadata[0]['rank']::string as Rank,
raw_metadata[0]['uptime']['address']::string as Proposer
from osmosis.core.dim_labels
where label_subtype = 'validator'
)
Run a query to Download Data