mlhrealm vs snap-total
Updated 2022-08-30Copy 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
›
⌄
with realm as(SELECT 'realm' as platform,
count(DISTINCT tx_id) as votes_count,
count(DISTINCT VOTER_ACCOUNT) as voters_count,
count(DISTINCT tx_id) / COUNT(DISTINCT PROPOSAL) as avg_vote_per_proposal,
COUNT(DISTINCT PROPOSAL) as propsals,
count(DISTINCT PROGRAM_NAME) as DAOs,
count(DISTINCT PROPOSAL) / COUNT(DISTINCT PROGRAM_NAME) as avg_proposal_per_dao,
count(DISTINCT VOTER_ACCOUNT) / COUNT(DISTINCT PROGRAM_NAME) as avg_voter_per_dao
FROM solana.core.fact_proposal_votes
where governance_platform = 'realms'
group by 1
),
snapshot AS(SELECT 'Snapshot' as platform,
count(DISTINCT id) as votes_count,
count(DISTINCT VOTER) as voters_count,
count(DISTINCT id) / COUNT(DISTINCT PROPOSAL_id) as avg_vote_per_proposal,
COUNT(DISTINCT PROPOSAL_id) as propsals,
COUNT(DISTINCT space_id) as DAOs,
count(DISTINCT PROPOSAL_id) / COUNT(DISTINCT space_id) as avg_proposal_per_dao,
count(DISTINCT VOTER) / COUNT(DISTINCT space_id) as avg_voter_per_dao
FROM ethereum.core.ez_snapshot
group by 1
)
select * from realm
UNION
select * from snapshot
Run a query to Download Data