with new_wallets as (
select
min(block_timestamp) as timestamp,
token_in_contract
from near.core.ez_dex_swaps
group by token_in_contract
)
select
date_trunc('week', timestamp) as week,
count(distinct token_in_contract) as contracts
from new_wallets
group by week
order by week asc