Alexay5metrics daos
Updated 2022-08-16Copy Reference Fork
999
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
›
⌄
--select governance_platform, program_name, block_timestamp, block_id, tx_id, succeeded, voter, voter_account, voter_nft, vote_choice, proposal, realms_id
--MANGO
with mango_prop as ( select min(block_timestamp) as time_
from solana.core.fact_proposal_votes
where governance_platform='realms' and succeeded='TRUE' and realms_id='DPiH3H3c7t47BMxqTxLsuPQpEC6Kne8GA9VXbxpnZxFE'
group by proposal),
mango as (select 'MANGO' as name, count(distinct voter) as members, count(tx_id) as total_votes, count(distinct proposal) as proposals, (total_votes/proposals) as mean_votes_per_prop,
min(block_timestamp::date) as creation_date, (select max(time_::date) from mango_prop) as last_proposal
from solana.core.fact_proposal_votes
where governance_platform = 'realms' and succeeded='TRUE' and realms_id = 'DPiH3H3c7t47BMxqTxLsuPQpEC6Kne8GA9VXbxpnZxFE'),
--GRAPE
grape_prop as ( select min(block_timestamp) as time_
from solana.core.fact_proposal_votes
where governance_platform='realms' and succeeded='TRUE' and realms_id='By2sVGZXwfQq6rAiAM3rNPJ9iQfb5e2QhnF4YjJ4Bip'
group by proposal),
grape as ( select 'GRAPE' as name, count(distinct voter) as members, count(tx_id) as total_votes, count(distinct proposal) as proposals, (total_votes/proposals) as mean_votes_per_prop,
min(block_timestamp::date) as creation_date, (select max(time_::date) from grape_prop) as last_proposal
from solana.core.fact_proposal_votes
where governance_platform = 'realms' and succeeded='TRUE' and realms_id = 'By2sVGZXwfQq6rAiAM3rNPJ9iQfb5e2QhnF4YjJ4Bip'),
--psy fin
psy_fin_prop as ( select min(block_timestamp) as time_
from solana.core.fact_proposal_votes
where governance_platform='realms' and succeeded='TRUE' and realms_id='FiG6YoqWnVzUmxFNukcRVXZC51HvLr6mts8nxcm7ScR8'
group by proposal),
psy_fin as ( select 'PSY_FINANCE' as name, count(distinct voter) as members, count(tx_id) as total_votes, count(distinct proposal) as proposals, (total_votes/proposals) as mean_votes_per_prop,
min(block_timestamp::date) as creation_date, (select max(time_::date) from psy_fin_prop) as last_proposal
from solana.core.fact_proposal_votes
where governance_platform = 'realms' and succeeded='TRUE' and realms_id = 'FiG6YoqWnVzUmxFNukcRVXZC51HvLr6mts8nxcm7ScR8'),
--solend
solend_prop as ( select min(block_timestamp) as time_
from solana.core.fact_proposal_votes
where governance_platform='realms' and succeeded='TRUE' and realms_id='7sf3tcWm58vhtkJMwuw2P3T6UBX7UE5VKxPMnXJUZ1Hn'
Run a query to Download Data