MLDZMNcx1
Updated 2023-06-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
›
⌄
-- forked from DDU6 @ https://flipsidecrypto.xyz/edit/queries/23bfaf86-a7a8-4738-8db6-d4bd73c5c85b
with tb1 as(SELECT
*
from ethereum.core.dim_labels
where label_type='cex'
)
select
BLOCK_TIMESTAMP::date as day,
case when day>='2023-05-24' then 'After upgrade' else 'Before upgrade' end as period,
'Sent to CEXs' as paths,
count(distinct tx_hash) as no_transfer,
count(distinct FROM_ADDRESS) as no_sender,
sum(AMOUNT) as total_volume,
avg(AMOUNT) as avg_volume,
sum(total_volume) over (order by day) as cum_volume
from ethereum.core.ez_token_transfers
where CONTRACT_ADDRESS='0x65ef703f5594d2573eb71aaf55bc0cb548492df4'
and ORIGIN_TO_ADDRESS in (select ADDRESS from tb1)
and ORIGIN_FROM_ADDRESS not in (select ADDRESS from tb1)
and BLOCK_TIMESTAMP>='2023-05-01'
group by 1,2
union ALL
select
BLOCK_TIMESTAMP::date as day,
case when day>='2023-05-24' then 'After upgrade' else 'Before upgrade' end as period,
'Receive from CEXs' as paths,
count(distinct tx_hash) as no_transfer,
count(distinct TO_ADDRESS) as no_sender,
sum(AMOUNT) as total_volume,
avg(AMOUNT) as avg_volume,
sum(total_volume) over (order by day) as cum_volume
from ethereum.core.ez_token_transfers
where CONTRACT_ADDRESS='0x65ef703f5594d2573eb71aaf55bc0cb548492df4'
Run a query to Download Data