Updated 2022-11-16
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
›
⌄
with tb as ( select block_timestamp as date,
origin_from_address,
sum(raw_amount/pow(10,18)) as total_amount,
count(DISTINCT tx_hash) as total_transaction
from optimism.core.fact_token_transfers
where tx_hash in ( select tx_hash
from optimism.core.fact_event_logs
where event_name = 'Claimed'
and contract_address = lower('0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'))
group by date,origin_from_address)
,
t1 as ( select block_timestamp as date,
origin_from_address
from optimism.core.fact_token_transfers
where tx_hash not in ( select tx_hash
from optimism.core.fact_event_logs
where contract_address = lower('0xfedfaf1a10335448b7fa0268f56d2b44dbd357de'))),
t2 as ( select x.date , x.origin_from_address
from t1 x join tb y on x.origin_from_address = y.origin_from_address
where x.date > y.date )
select 'Holder' as case ,
count(DISTINCT origin_from_address) as total_user
from tb
where origin_from_address not in ( select origin_from_address from t1)
UNION
select 'Seller' as case,
count(DISTINCT origin_from_address) as total_user
from t2
Run a query to Download Data