with new_wallets as (
select
min(block_timestamp) as timestamp,
tx_signer
from near.core.fact_transactions
group by tx_signer
)
select
date_trunc('week', timestamp) as week,
count(distinct tx_signer) as wallets
from new_wallets
group by week
order by week asc