HadisehDaily Active User 2
Updated 2023-02-13
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
›
⌄
with tb as ( select tx_from,count(DISTINCT tx_id) as transactions
from osmosis.core.fact_transactions
where TX_SUCCEEDED = 'True'
group by tx_from),
t1 as ( select DISTINCT tx_from
from tb
where transactions >= 20)
select trunc(block_timestamp, 'month') as months,
'Active wallet' as status,
COUNT(DISTINCT(tx_from)) as total_wallet,
sum(total_wallet) over (order by months asc) as cumulative_wallet
from osmosis.core.fact_transactions
where tx_from in (select tx_from from t1)
and months >= CURRENT_DATE - 365
group by months,status
UNION
select trunc(block_timestamp, 'month') as months,
'Normal wallet' as status,
COUNT(DISTINCT(tx_from)) as total_wallet,
sum(total_wallet) over (order by months asc) as cumulative_wallet
from osmosis.core.fact_transactions
where tx_from not in (select tx_from from t1)
and months >= CURRENT_DATE - 365
group by months,status
Run a query to Download Data