h4wkDistinct Wallets (Optimism Bridge) 2
Updated 2022-09-11
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
›
⌄
-- Q1. How many distinct wallets have deposited or withdrawn ETH to Optimism via the native bridge in the last 60 days?
with deposit as (
select
count(*) as tx_count,
count(distinct from_address) as unique_address,
sum(eth_value) as volume_eth,
'deposit' as type
from ethereum.core.fact_transactions
where to_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
-- and block_timestamp::date > CURRENT_DATE - 61 and block_timestamp::date < CURRENT_DATE
and eth_value > 0
group by type
), withdraw as (
select
count(*) as tx_count,
count(distinct to_address) as unique_address,
sum(eth_value) as volume_eth,
'withdraw' as type
from ethereum.core.fact_traces
where
from_address = '0x99c9fc46f92e8a1c0dec1b1747d010903e884be1'
-- and block_timestamp::date > CURRENT_DATE - 61 and block_timestamp::date < CURRENT_DATE
and eth_value > 0
group by type
)
select * from deposit
UNION
select * from withdraw
Run a query to Download Data