mansaVoting Activity Classification
Updated 2022-06-21
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
with voting_act as (
select
event_inputs:proposalId as ProposalNumber,
sum(IFF(event_inputs:support::string = 1, event_inputs:votes,0)) as Yes_votes,
sum(IFF(event_inputs:support::string = 0, event_inputs:votes, 0)) as No_votes,
event_inputs:voter as users,
sum(event_inputs:votes) as LN_NFT
from ethereum.core.fact_event_logs
where lower(contract_address) = lower('0x5d2C31ce16924C2a71D317e5BbFd5ce387854039')
and event_name = 'VoteCast'
group by ProposalNumber, users
)
select
ProposalNumber,
sum(case when LN_NFT <= 1 then 1 end) as Placton,
sum (case when LN_NFT >= 2 and LN_NFT <= 3 then 1 end) as Crab,
sum (case when LN_NFT > 3 and LN_NFT <= 5 then 1 end) as Shark,
sum (case when LN_NFT > 5 then 1 end) as Whale
from voting_act
group by ProposalNumber
Run a query to Download Data