with min_date as (
select
tx_sender,
min(block_timestamp) as min_date
from terra.core.fact_transactions
group by 1
),
info as (
select
date_trunc('day', min_date) as "Day",
count(distinct tx_sender) as "New wallet"--,
-- sum("New wallet") over (order by "Day") as "Cum new wallet"
from min_date
where "Day" >= current_date - 90
group by 1
)
select avg("New wallet") as "AVG New wallet"
from info