arazfeyzivotes for the proposals
Updated 2022-06-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with votes AS
(
select event_inputs:proposalId as id ,
sum((case when event_inputs:support= '0' then 1 else 0 end) * event_inputs:votes) as againsts,
sum((case when event_inputs:support= '1' then 1 else 0 end) * event_inputs:votes) as fors,
sum((case when event_inputs:support= '2' then 1 else 0 end) * event_inputs:votes) as abstains
from ethereum.core.fact_event_logs
where contract_address = '0x5d2c31ce16924c2a71d317e5bbfd5ce387854039' and event_name='VoteCast'
group by 1
)
select a.id::INT as proposal_number,
a.fors as agree,
a.abstains as Abstains,
a.againsts as reject
from votes a
order by 1
Run a query to Download Data