Eman-RazBlocks & Reward
    Updated 2023-08-22
    select date_trunc('month',block_timestamp) as "Date", count(distinct block_hash) as "Blocks Count", sum(block_reward) as "Blocks Reward",
    sum(fees) as "Blocks Fee", sum(TOTAL_REWARD) as "Total Blocks Reward", case
    when block_timestamp::date>='2012-11-28' and block_timestamp::date<='2016-07-08' then 'After 1st Halving: Nov 28, 2012'
    when block_timestamp::date>='2016-07-09' and block_timestamp::date<='2020-05-10' then 'After 2st Halving: Jul 9, 2016'
    when block_timestamp::date>='2020-05-11' then 'After 3st Halving: May 11, 2020'
    else 'Before the first Halving'
    end as "Time Period"
    from bitcoin.core.ez_miner_rewards
    group by 1,6
    order by 1
    Run a query to Download Data