with
t1 as (
select
trader,
min(block_timestamp::date) as min_date
from osmosis.core.fact_swaps
group by trader
),
t2 as (
select
min_date,
count(*) as new_swappers_count
from t1
group by min_date
)
select
sum(new_swappers_count) as new_swappers_count
from t2
where min_date > current_date - 90