with new_opt as (
select distinct(contract_address) as address , min(block_timestamp)::date as min_date
from optimism.core.fact_event_logs
where event_name = 'Approval'
group by 1
having min_date between current_date - 90 and current_date - 1
)
select min_date, count(address) as new_smartcontracts,
sum(new_smartcontracts) over (order by min_date asc rows between unbounded preceding and current row) as cum_new_smartcontracts
from new_opt
group by 1
order by 1 asc