with contract as (
select
min(block_timestamp::date) as min_date,
tx_receiver
from near.core.fact_transactions
where tx_hash in (select tx_hash from near.core.fact_actions_events where action_name = 'DeployContract')
group by 2
)
select
min_date,
count(DISTINCT tx_receiver) as contract_cnt,
sum(contract_cnt) over (order by min_DATE asc rows between unbounded preceding and current row) cumulative_number_of__contract
from contract
group by 1