0xHaM-dNew User
Updated 2022-10-24Copy Reference Fork
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
›
⌄
with first_tx as (
select
'Optimism' as network,
from_address,
min(block_timestamp) as min_date
from optimism.core.fact_transactions
group by 1,2
UNION
select
'Ethereum' as network,
from_address,
min(block_timestamp) as min_date
from ethereum.core.fact_transactions
group by 1,2
)
select
min_date::date as date,
network,
count(distinct from_address) as new_user,
sum(new_user) over (partition by network order by date) as cum_new_user
from first_tx
WHERE date > CURRENT_DATE - 181
AND date <= CURRENT_DATE - 1
group by 1,2
Run a query to Download Data