select BLOCK_TIMESTAMP::date as date,
case
when date between '2023-01-07' and '2023-01-13' then 'Before launch'
else 'After launch' end as categ_date,
count(DISTINCT tx_id) as count_txs,
count(DISTINCT TX_SENDER) as count_senders
from terra.core.fact_transactions
where TX_SUCCEEDED and date BETWEEN '2023-01-07' and '2023-01-20'
group by 1,2