MLDZMNsb4
Updated 2023-06-07
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 pepe4 @ https://flipsidecrypto.xyz/edit/queries/2ed00606-f8d7-4159-b7db-6ffe232904f8
-- forked from ETHflow @ https://flipsidecrypto.xyz/edit/queries/30b64c54-987f-4883-9663-b0dcdf8f5061
with tb1 as(SELECT
*
from ethereum.core.dim_labels
where label_type='cex'
),
tb2 as (select
BLOCK_TIMESTAMP::date as day,
count(distinct tx_hash) as no_transfer,
count(distinct FROM_ADDRESS) as no_sender,
sum(AMOUNT) as total_volume,
avg(AMOUNT) as avg_volume,
median(AMOUNT) as median_volume,
sum(total_volume) over (order by day) as cum_volume
from ethereum.core.ez_token_transfers
where to_address in (select ADDRESS from tb1)
and FROM_ADDRESS not in (select ADDRESS from tb1)
and CONTRACT_ADDRESS = lower('0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE')
and BLOCK_TIMESTAMP BETWEEN '2021-10-01' and '2022-01-01'
group by 1),
tb3 as (select
BLOCK_TIMESTAMP::date as day,
count(distinct tx_hash) as no_transfer1,
count(distinct to_address) as no_sender1,
sum(AMOUNT) as total_volume1,
avg(AMOUNT) as avg_volume1,
sum(total_volume1) over (order by day) as cum_volume1
from ethereum.core.ez_token_transfers
where FROM_ADDRESS in (select ADDRESS from tb1)
and to_address not in (select ADDRESS from tb1)
and CONTRACT_ADDRESS = lower('0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE')
Run a query to Download Data