select
BLOCK_TIMESTAMP::date as days ,
iff(BLOCK_TIMESTAMP::date = '2023-01-09','9 January','Other Days') as type ,
count(distinct TX_ID) as txns ,
count(distinct TRADER) as active_users
from
terra.core.ez_swaps
where
days between CURRENT_DATE - 20 and CURRENT_DATE - 5
group by days, type