AMLBotnew users activity stats copy
Updated 2023-11-14Copy Reference Fork
9999
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 new users activity stats @ https://flipsidecrypto.xyz/edit/queries/ae8f3f18-e557-451a-96f8-98c1a963b7e8
with optimism_users_first_activity as(
select
wallet,
'Optimism' blockchain,
min(week) first_activity_week
from
(
(select
date_trunc(week,block_timestamp) as week,
'Optimism' blockchain,
'Inflow to L0' type,
tx_hash,
from_address wallet
from optimism.core.ez_token_transfers
where
(to_address in (select address from
Optimism.core.dim_labels
where ADDRESS_NAME ilike '%layerzero%')
--and date_trunc(week,block_timestamp) >= current_date - {{days_back}}
)
)
union all
(select
date_trunc(week,block_timestamp) week,
'Optimism' blockchain,
'Inflow to L0' type,
tx_hash,
ETH_from_address wallet
from Optimism.core.ez_eth_transfers
where
(
Run a query to Download Data