hbd1994Voters Average OSMO Balance
Updated 2022-11-24Copy Reference Fork
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 maintable as (
select
BLOCK_TIMESTAMP,
TX_ID,
VOTER,
VOTE_OPTION,
DESCRIPTION,
VOTE_WEIGHT
from osmosis.core.fact_governance_votes a
join osmosis.core.dim_vote_options b on b.VOTE_ID =a.VOTE_OPTION
where PROPOSAL_ID = '362'
and TX_STATUS = 'SUCCEEDED'),
validator_balance as(
select
voter as "Other Voters",
(balance/1e6) as "OSMO Balance"
from osmosis.core.fact_daily_balances
join maintable on voter = address
where currency = 'uosmo'
and voter not in (
select
VOTER
from osmosis.core.fact_governance_votes a
join osmosis.core.dim_vote_options b on b.VOTE_ID =a.VOTE_OPTION
join osmosis.core.dim_labels on RAW_METADATA[0]:account_address = voter
where PROPOSAL_ID = '362'
and TX_STATUS = 'SUCCEEDED')
and date < CURRENT_DATE
and date >= CURRENT_DATE - 1),
avg_balance as (
select
distinct "Other Voters",
avg("OSMO Balance") as "Average OSMO Balance"
from validator_balance
group by 1)
Run a query to Download Data