CryptoLionTerra Governance Proposals
Updated 2021-08-23
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
33
34
35
36
›
⌄
with counts as (select
date_trunc('month',block_timestamp) as month,
sum(case when proposal_type like '%Text%' then 1 else 0 end) as text_porposals,
sum(case when proposal_type not like '%Text%' then 1 else 0 end) as param_proposals,
-- sum(case when proposal_type like '%Text%' then deposit_amount_usd else 0 end) as text_deposits,
-- sum(case when proposal_type not like '%Text%' then deposit_amount_usd else 0 end) as param_deposits,
count(distinct proposer) as proposers
from terra.gov_submit_proposal
group by 1),
delegates as (
select
date_trunc('month',block_timestamp) as month,
count(distinct delegator_address) as delegators,
sum(case when action = 'delegate' then event_amount_usd else 0 end) as volume,
sum(volume) over (order by month) as running_volume
from terra.staking
group by 1
order by 1 desc),
transactions as (
select
date_trunc('month',block_timestamp) as month,
count(distinct tx_id) as transactions,
lag(transactions) ignore nulls over (order by month) as l_transactions,
(transactions-l_transactions)/l_transactions*100 as percentage_change
from terra.transactions
group by 1
order by 1 desc
)
select
d.month,
delegators,
volume,
running_volume,
text_porposals,
param_proposals,
proposers,
Run a query to Download Data