NavidCopy of Copy of Copy of Untitled Query
Updated 2022-11-05Copy 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
26
27
28
29
30
31
32
33
34
35
36
›
⌄
with pos_miners as
(
select
'PoS' as type,
b.miner,
count(distinct b.HASH) as blocks_count,
case
when blocks_count<=100 then 'A: less than 100 blocks'
when blocks_count>100 and blocks_count<=1000 then 'B: between 100 and 1k blocks'
when blocks_count>1000 and blocks_count<=10000 then 'C: between 1k and 10k blocks'
else 'D: more than 10k blocks'
end as label
from
ethereum.core.fact_blocks b join ethereum.core.fact_transactions t on b.hash=t.BLOCK_HASH
where
NETWORK='mainnet' and BLOCKCHAIN='ethereum'
and b.BLOCK_TIMESTAMP>'2022-09-15' and b.BLOCK_TIMESTAMP<'2022-10-30'
group by
miner
), pow_miners as
(
select
'PoW' as type,
b.miner,
count(distinct b.HASH) as blocks_count,
case
when blocks_count<=100 then 'A: less than 100 blocks'
when blocks_count>100 and blocks_count<=1000 then 'B: between 100 and 1k blocks'
when blocks_count>1000 and blocks_count<=10000 then 'C: between 1k and 10k blocks'
else 'D: more than 10k blocks'
end as label
from
ethereum.core.fact_blocks b join ethereum.core.fact_transactions t on b.hash=t.BLOCK_HASH
where
NETWORK='mainnet' and BLOCKCHAIN='ethereum'
and b.BLOCK_TIMESTAMP<'2022-09-15' and b.BLOCK_TIMESTAMP>'2022-08-01'
Run a query to Download Data