boomer77voting yes
Updated 2022-05-07
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
›
⌄
with raw as (select block_timestamp, proposal_id, option, voter, CASE
when voter_label_subtype is null then 'user'
else voter_label_subtype end as type,case
when option = 'VOTE_OPTION_NO' then 'No'
when option = 'VOTE_OPTION_NO_WITH_VETO' then 'NoWithVeto'
when option = 'VOTE_OPTION_ABSTAIN' then 'Abstain'
when option = 'VOTE_OPTION_YES' then 'Yes'
else option end as vote_option
from terra.gov_vote),
title as (select proposal_id, title, date(block_timestamp) as dt
from terra.gov_submit_proposal
order by 1 asc)
select a.proposal_id, b.title, a.vote_option, a.type, count(distinct a.voter) as vote_count
from raw a
left join title b on a.proposal_id = b.proposal_id
where a.proposal_id in ('1092', '1075', '1046', '1025', '1014') and a.vote_option = 'Yes'
group by 1,2,3,4
order by cast(a.proposal_id as int) asc
Run a query to Download Data