nitsOverall Voting Participation
Updated 2022-02-16
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 whales as (SELECT * from
(SELECT address, avg(balance_usd) as avg_balance from terra.daily_balances
where date > CURRENT_DATE-90
GROUP by 1 )
where avg_balance > pow(10,6) ),
mir_counts as
(SELECT count(*) as total_mir_particpation from
(SELECT DISTINCT addr FROM
(SELECT msg_value:sender as addr from terra.msgs
where msg_value:contract = 'terra1wh39swv7nq36pnefnupttm2nr96kz7jjddyt2x'
and msg_value:sender in (SELECT address from whales) and block_timestamp > CURRENT_DATE -90)
)
) ,
anc_counts as (
SELECT count(*) as anc_participation from
(SELECT DISTINCT addr from (SELECT voter as addr from anchor.gov_vote
where block_timestamp > CURRENT_DATE -90 and voter in (SELECT address from whales)))
),
terra_counts as (
SELECT count(*) as terra_participation from
(SELECT DISTINCT addr from (SELECT voter as addr from terra.gov_vote
where voter in (select address from whales) and block_timestamp > CURRENT_DATE -90 ))
),
anc_terra as (
SELECT count(*) as anc_terra from
(SELECT DISTINCT addr from( (SELECT voter as addr from anchor.gov_vote
where block_timestamp > CURRENT_DATE -90 and voter in (SELECT address from whales))
UNION ALL
(SELECT voter as addr from terra.gov_vote
where voter in (select address from whales) and block_timestamp > CURRENT_DATE -90 )
))) ,
Run a query to Download Data