RamaharCosmos new vs existing users
Updated 2022-12-18
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
›
⌄
With newWallet as (select
MIN(DATE(block_timestamp)) as first_date,
tx_from
from cosmos.core.fact_transactions
group by 2),
newUsers as (select
first_date,
count(distinct tx_from) as new_users
from newWallet
group by 1 )
select
DATE(block_timestamp) as dayz,
count (distinct t.tx_from) as Users,
new_users,
users - coalesce(new_users, 0) as existing_users
from cosmos.core.fact_transactions t
left join newUsers ON first_date = t.block_timestamp::date
group by 1 , 3
having dayz >= '2022-01-01'
Run a query to Download Data