ramishoowUntitled Query
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
›
⌄
with maintable as (
select proposal_id,
case when proposal_id = '362' then 'Proposal #362' else 'Other Recent Proposals' end as proposalID,
count (distinct depositor) as "Depositors Count",
sum (amount) as Deposit_Volume
from osmosis.core.fact_governance_proposal_deposits
where proposal_id::numeric >= '300' and proposal_id::numeric <= '365'
and tx_status = 'SUCCEEDED'
group by 1,2
order by 3 desc),
table1 as (
select count (distinct depositor) as Depositors_Count,
sum (amount) as Deposit_Volume
from osmosis.core.fact_governance_proposal_deposits
where tx_status = 'SUCCEEDED'
and proposal_id in ('362'))
select 'Recent Proposals' as type,
avg (Depositors_Count) as Depositors_Count,
avg (Deposit_Volume) as Average_Deposit_Volume
from maintable
union ALL
select 'Proposal #362' as type,
Depositors_Count,
Deposit_Volume
from table1
Run a query to Download Data