freemartianNounsDAO Proposals
Updated 2022-07-06Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
›
⌄
with source as (
SELECT
tx_json:receipt:logs[0]:decoded:inputs:proposalId AS ID,
tx_json:receipt:logs[0]:decoded:inputs:votes AS votes,
case
when tx_json:receipt:logs[0]:decoded:inputs:support = '0' then 'Against'
when tx_json:receipt:logs[0]:decoded:inputs:support = '1' then 'For'
when tx_json:receipt:logs[0]:decoded:inputs:support = '2' then 'Abstain'
end as position
from ethereum.core.fact_transactions
where tx_json:receipt:logs[0]:address = '0x6f3e6272a167e8accb32072d08e0957f9c79223d'
and tx_json:receipt:logs[0]:decoded:eventName = 'VoteCast'
)
select ID, position, sum(votes) as votes
from source
group by ID, position
Run a query to Download Data