kiacryptoPercentage of miners transfer into each CEX
Updated 2022-09-30Copy Reference Fork
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
›
⌄
with miners as (
select miner
from ethereum.core.fact_blocks
),
users_transfer as (
select
label,
sum(amount) as user_volume
from ethereum.core.ez_eth_transfers join ethereum.core.dim_labels on origin_to_address = address
where block_timestamp::date >= '2022-08-01' and block_timestamp::date < current_date and label_type = 'cex'
group by 1
),
miners_transfer as (
select
label,
sum(amount) as miner_volume
from ethereum.core.ez_eth_transfers join ethereum.core.dim_labels on origin_to_address = address
where block_timestamp::date >= '2022-08-01' and block_timestamp::date < current_date and label_type = 'cex' and origin_from_address in (select miner from miners)
group by 1
)
select u.label, (iff(miner_volume is null, 0, miner_volume) / user_volume) * 100 as miner_transfer_percentage
from users_transfer u left join miners_transfer m on u.label = m.label
Run a query to Download Data