AlihastamUntitled Query
Updated 2022-09-18Copy Reference Fork
99
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
›
⌄
with tableone as ( select count(distinct miner) as "miners", count(distinct HASH) as "Blocks",miner,
sum (TX_COUNT) as "Txn"
from ethereum.core.fact_blocks
where network = 'mainnet' AND blockchain = 'ethereum'
GROUP by miner order by "Blocks" DESC limit 20 )
select date_trunc('day',block_timestamp) as day, count(distinct miner) as "miners", count(distinct HASH) as "Blocks",miner,
sum (TX_COUNT) as "Txn",
sum ("Blocks") over (partition by miner order by day ) as cum_Blocks, sum ("Txn") over (partition by miner order by day) as cum_Txn
from ethereum.core.fact_blocks
where network = 'mainnet' AND blockchain = 'ethereum'
and miner in (select miner from tableone)
GROUP by 1,miner
Run a query to Download Data