SELECT date_trunc('day', block_timestamp) AS dayt
,CASE when dayt < '2023-01-17' then 'pre-fork'
WHEN dayt >= '2023-01-17' then 'after-fork'
end as pre_after_fork
,AVG(gas_price) AS daily_average_gas_price
FROM polygon.core.fact_transactions
WHERE block_timestamp > '2022-12-01'
GROUP BY 1