NavidCopy of Copy of Copy of Untitled Query
    Updated 2022-11-05
    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