with active_users as (
select block_timestamp,
block_number,
from_address,
count(DISTINCT tx_hash) as txs
from polygon.core.fact_transactions
group by 1,2,3
having txs > 50)
select
block_timestamp::date as date,
CASE
WHEN BLOCK_NUMBER >= 38189056 THEN 'After Hard fork'
WHEN BLOCK_NUMBER < 38189056 THEN 'Before Hard fork'
END AS TYPE ,
count (distinct from_address) as active_userss
from active_users
where date >= '2022-12-01'
group by 1,2