SELECT
date_trunc('day',block_timestamp) as date,
CASE
WHEN date >= '2022-11-09' then 'after ftx'
when date < '2022-11-09' then 'before ftx'
end as time,
count(distinct tx_id) as swap_tx,
count(distinct trader) as uniqe_swapper
FROM osmosis.core.fact_swaps
WHERE date >= current_date - 30
AND TX_STATUS = 'SUCCEEDED'
group by 1,2