select
block_timestamp::date as date,
case
when date < '2022-05-01' then 'Before'
when date > '2022-05-01' and date < '2022-06-30' then 'during in'
when date > '2022-06-30' then 'After '
end as timeframe,
count(tx_hash)
from ethereum.core.fact_transactions
where date >= '2022-01-01' and date <= '2022-07-25'
GROUP by 1