adriaparcerisasterra grind 7
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
›
⌄
-- 3796: ERIS Protocol Revised Grant Proposal
-- 3795: Texas Poker Grant Proposal
WITH
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,
datediff('day',first_vote,block_timestamp) as day_of_vote,
count(DISTINCT voter) as voters,
sum(voters) over (partition by proposals order by day_of_vote) as cum_voters,
count(distinct tx_id) as votes,
sum(votes) over (partition by proposals order by day_of_vote) as cum_votes
FROM terra.core.fact_governance_votes
JOIN osmosis.core.dim_vote_options ON VOTE_ID = vote_option
JOIN proposals_info on terra.core.fact_governance_votes.proposal_id=proposals_info.proposal_id
GROUP by 1,2 order by 1 asc
Run a query to Download Data