with miners as
(
select
b.miner,
-- round(count(distinct b.HASH)/100)+1 as blocks_count
round(sum(t.TX_FEE))+1 as fee_eth
-- count(distinct t.TX_HASH) as tx_count
-- sum(ETH_VALUE) as total_trans_values
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'
group by
miner
)
select
fee_eth as fee,
count(*) as frequency
from
miners
group by
fee_eth
order by
fee_eth