mahdishUntitled Query
Updated 2022-09-29
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
›
⌄
WITH miners AS ( SELECT distinct miner
FROM ethereum.core.fact_blocks
where BLOCK_TIMESTAMP <='2022-09-14'),
Tminers as (SELECT BLOCK_TIMESTAMP::date as date, sum (AMOUNT) as ETH_amounts
from ethereum.core.ez_eth_transfers
where BLOCK_TIMESTAMP >= CURRENT_DATE - 60
and ORIGIN_FROM_ADDRESS IN (SELECT * FROM miners)
group by 1),
Tothers as (SELECT BLOCK_TIMESTAMP::date as date, sum (AMOUNT) as ETH_amounts
from ethereum.core.ez_eth_transfers
where BLOCK_TIMESTAMP >= CURRENT_DATE - 60
and ORIGIN_FROM_ADDRESS Not IN (SELECT * FROM miners)
group by 1 )
SELECT a.date, (a.ETH_amounts/b.ETH_amounts)*100 as "transfering percent of miners",
case
when a.date <'2022-09-14' then 'before_merge'
when a.date >= '2022-09-14' then 'after_merge'
end as merge_time
from Tminers a join Tothers b on a.date=b.date
Run a query to Download Data