select
date_trunc('week',block_timestamp) as date,
CASE
when date >= '2022-01-01' and date < '2022-12-18' then 'other days'
when date >= '2022-12-18' and date <= '2023-01-03' then 'holidays'
end as time_frame,
count(distinct tx_id) as tx_count,
count(distinct sender) as sender,
count(distinct receiver) as receiver
from terra.core.ez_transfers
where TX_SUCCEEDED = 'TRUE'
and date <= '2023-01-03'
group by 1,2