select
case
when block_timestamp < '2021-02-01' then 'jan 2021'
when month(block_timestamp) = 12 then 'dec 2021'
else 'jan 2022'
end month_time,
date(block_timestamp) as date,
count(distinct address) as users
from algorand.transaction_participation
where year(block_timestamp) >= 2021
and month(block_timestamp) = 1
group by 1,2
limit 1000