Afonso_Diaz2023-06-17 02:28 AM
Updated 2023-06-16
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
›
⌄
with t as (
select
date_trunc('month', block_timestamp)::date as month,
count(distinct tx_id) as proposals,
sum(proposals) over (order by month) as cumulative_proposals
from cosmos.core.fact_governance_submit_proposal
where tx_succeeded = 1
group by 1
),
t2 as (
select
date_trunc('month', block_timestamp)::date as month,
count(distinct tx_id) as votes,
count(distinct voter) as voters,
sum(votes) over (order by month) as cumulative_votes
from cosmos.core.fact_governance_votes
where tx_succeeded = 1
group by 1
)
select * from t2
join t
using(month)
order by month
Run a query to Download Data