select
date_trunc(hour,block_timestamp) as dt,
count(distinct tx_hash) as tx_count,
tx_count/3600 as tps,
case
when block_timestamp > '2023-01-17' then 'post-fork'
else 'pre-fork'
end as period
from polygon.core.fact_transactions
where block_timestamp >= '2022-11-01'
and status='SUCCESS'
group by 1,4