rajs# of Votes Per Proposal
Updated 2023-01-25Copy 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
›
⌄
with latest_proposals as
(
SELECT
proposal_id::text as proposal_id,
count(*) as no_of_votes,
count(distinct voter) as no_of_voters,
min(block_timestamp),
max(block_timestamp)
from terra.core.fact_governance_votes
where tx_succeeded
group by 1
order by 5 desc
limit 5
)
SELECT
proposal_id::text as proposal_id,
vote_option_text,
count(*) as no_of_votes,
count(distinct voter) as no_of_voters,
min(block_timestamp),
max(block_timestamp)
from terra.core.fact_governance_votes
where tx_succeeded
and proposal_id in (select proposal_id from latest_proposals)
-- and proposal_id = 3796
group by 1,2
-- order by 5 desc
Run a query to Download Data