MLDZMNOA5
Updated 2023-05-01
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
›
⌄
with tt as (with tb1 as (SELECT
*
FROM optimism.core.fact_event_logs
WHERE ORIGIN_TO_ADDRESS = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
AND TOPICS[0] = '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef'
AND BLOCK_TIMESTAMP > '2022-05-25'
AND TX_STATUS = 'SUCCESS')
SELECT
distinct TO_ADDRESS as users,
BLOCK_TIMESTAMP,
sum(RAW_AMOUNT/1e18) as volume_OP
FROM optimism.core.fact_token_transfers
WHERE contract_address = '0x4200000000000000000000000000000000000042'
and tx_hash in (select tx_hash from tb1)
and from_address = '0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'
group by 1,2
),
tb2 as (
select
x.BLOCK_TIMESTAMP,
x.origin_from_address,
x.origin_to_address,
x.tx_hash
from optimism.core.fact_event_logs x
join tt y on x.origin_from_address = y.users and x.block_timestamp>y.block_timestamp
where contract_address = '0x4200000000000000000000000000000000000042'
order by 1
)
select
distinct event_name as first_actions,
count(distinct tx_hash) as counts,
count(distinct origin_from_address) as users
from optimism.core.fact_event_logs
Run a query to Download Data