shreyash-5873Voting for Proposal 106
Updated 2022-04-02
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
27
28
29
30
31
32
33
34
35
36
›
⌄
with staked_balances as (
select
date(date) as block_date,
address,
address_label,
address_name,
balance_type,
currency,
sum(balance) as total_staked_luna,
sum(balance_usd) as total_stake_luna_value_usd
from terra.daily_balances
where currency = 'LUNA'
and balance_type = 'staked'
and datediff(day, block_date, current_date()) <= 31
group by 1, 2, 3, 4, 5, 6
order by block_date desc),
-- select * from staked_balances limit 100;
categorised_stakes as (select
block_date,
address,
address_name,
address_label,
case when total_staked_luna < 1000 then 'Small Fry'
else 'Big Fish'
end as voting_power_category,
total_staked_luna as voting_power
from staked_balances),
proposal_votes as (
select
date(block_timestamp) as block_date,
voter,
voting_power as fake_voting_power
from terra.gov_vote
where proposal_id = 106
and tx_status = 'SUCCEEDED'),
votes_with_category as (
Run a query to Download Data