boomer77galactic lounge voting
Updated 2022-01-19
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
›
⌄
with voting as (select date(block_timestamp) as dt, voter, case
when voter = 'terra1fg5g8acntt90n9303cm5fjza9s3newleq4rlmk' then 'Galactic Lounge'
when voter = 'terra1alpf6snw2d76kkwjv3dp4l7pcl6cn9uytq89zk' then 'Smart Stake'
else null end as validator,
proposal_id, option, case
when option = 'VOTE_OPTION_YES' then 'Yes'
when option = 'VOTE_OPTION_NO' then 'No'
else option end as Votes
from terra.gov_vote
where voter in ('terra1fg5g8acntt90n9303cm5fjza9s3newleq4rlmk', 'terra1alpf6snw2d76kkwjv3dp4l7pcl6cn9uytq89zk') and tx_status = 'SUCCEEDED'
order by block_timestamp desc),
proposal as (select proposal_id, title
from terra.gov_submit_proposal),
final as (select a.proposal_id, a.title, b.dt, b.validator, b.votes, case
when votes = 'Yes' then 1
when votes = 'No' then 2
when votes = 'Abstain' then 3
else null end as voting
from proposal a
left outer join voting b on a.proposal_id = b.proposal_id)
select *
from final
where validator = 'Galactic Lounge' and votes is not null
Run a query to Download Data