MoeLayerzero outflow vs inflow tot
Updated 2023-04-29
999
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
›
⌄
(select
'Inflow to layerZero' as type ,
sum(tx_count) as all_txns ,
sum(user_count) as all_users ,
sum(usd_amount) as all_usd_amount,
all_usd_amount / all_txns as avg_usd_amount,
all_txns / all_users as txns_per_user,
all_usd_amount / all_users as usd_per_user
from (
(select
date_trunc(week,block_timestamp) as week,
count(tx_hash) as tx_count,
count(distinct from_address) as user_count,
sum(AMOUNT_USD) as usd_amount,
tx_count/user_count as tx_per_user,
usd_amount/user_count as usd_per_user
from optimism.core.ez_token_transfers
where (to_address in (select address from
Optimism.core.dim_labels
where
ADDRESS_NAME ilike '%layerzero%'
))
group by 1
union
select
date_trunc(week,block_timestamp) as week,
count(tx_hash) as tx_count,
count(distinct ETH_from_address) as user_count,
sum(AMOUNT_USD) as usd_amount,
Run a query to Download Data