0xPrzGnosis Total Active Vs New Users in Last 40 Days
Updated 2022-10-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
26
27
28
29
30
31
›
⌄
with new_user as (
select
min(block_timestamp) as min_date,
from_address
from gnosis.core.fact_transactions
WHERE block_timestamp >= CURRENT_DATE - 40
group by 2
)
select
min_date::date as date,
'New Users' as users,
count(distinct from_address) as new_users_cnt,
'0' as tx_cnt,
'0' as cum_tx_cnt
from new_user
group by 1,2
UNION
select
block_timestamp::date as date,
'Active Users' as users,
count(distinct from_address) as Users_Count,
count(distinct tx_hash) as tx_cnt,
sum(tx_cnt) over (order by date) as cum_tx_cnt
from gnosis.core.fact_transactions
where status = 'SUCCESS'
and block_timestamp >= CURRENT_DATE - 40
group by 1,2
Run a query to Download Data