h4wkOptimism New Users - Before After
Updated 2023-10-22Copy 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
29
30
31
32
33
34
35
36
›
⌄
-- forked from Optimism New Users - Total @ https://flipsidecrypto.xyz/edit/queries/24c2d131-b566-442f-b935-2ac0cfe7f539
with base as (
select date_trunc('week', block_timestamp) as date,
tx_hash,
from_address as user
from optimism.core.fact_transactions
where block_timestamp >= '2022-01-01'
and status = 'SUCCESS'
)
, new_users as (
select user,
min(date) as min_date
from base
group by 1
)
, daily_new_users as (
select min_date,
count(user) as new_count
from new_users
group by 1
)
, all_users as (
select date, count(distinct user) as all_count
from base
group by 1
)
-- select * from all_users
, base_period as (
select date,
-- case when date < '2022-06-01' then 'Before 1st Airdrop'
Run a query to Download Data