-- forked from 5dd161c4-3bc2-43ab-9073-db245819a6e2
select
case
when block_timestamp < '2023-01-18' then 'Before hard fork'
else 'After hard fork' end as date_cat,
count(*) as n_txs,
count(distinct from_address) as n_active_users,
sum(matic_value) as volume,
avg(tx_fee) as avg_fee
from polygon.core.fact_transactions
where (block_timestamp BETWEEN '2023-01-11' AND '2023-01-25')
group by 1