boomer77Governance Proposal Types
Updated 2021-08-25
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
›
⌄
with proposal as (
select date_trunc('day', block_timestamp) as block_day,
case when proposal_type = 'gov/TextProposal' then 'text'
else 'standard'
end as proposal_type
from terra.gov_submit_proposal
group by 1,2),
cumulative as
(select block_day, proposal_type,
count(proposal_type) as count_of_proposal,
sum(count_of_proposal) over (partition by proposal_type order by block_day) as cumulative_count
from proposal
group by 1,2)
select block_day, proposal_type, cumulative_count
from cumulative
where cumulative_count > 0
order by 1 asc
Run a query to Download Data