adriaparcerisasterra grind 6.2
Updated 2023-01-24
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
›
⌄
-- 3796: ERIS Protocol Revised Grant Proposal
-- 3795: Texas Poker Grant Proposal
WITH
news as (
SELECT
voter as validator_address,
min(trunc(block_timestamp,'day')) as debut
FROM terra.core.fact_governance_votes
GROUP BY 1
),
proposals_info as (
SELECT
proposal_id,
min(block_timestamp) as first_vote
FROM terra.core.fact_governance_votes
WHERE proposal_id in ('3795', '3796')
group by 1
)
SELECT
concat(proposals_info.proposal_id) as proposals,
case when datediff('day',debut,first_vote) <30 then 'New voter'
else 'Old voter' end as type,
--DESCRIPTION as vote,
count(DISTINCT voter) as voters,
sum(VOTE_WEIGHT) as voting_power
FROM terra.core.fact_governance_votes
JOIN osmosis.core.dim_vote_options ON VOTE_ID = vote_option
JOIN news on voter=validator_address
JOIN proposals_info on terra.core.fact_governance_votes.proposal_id=proposals_info.proposal_id
--WHERE osmosis.core.fact_governance_votes.proposal_id in (114, 196, 337)
GROUP by 1,2 order by 1 asc
Run a query to Download Data