with first_tx as (
SELECT TX_RECEIVER AS smart_contract, b.block_timestamp::date as first_date
FROM near.core.fact_transactions a
join near.core.fact_actions_events b
on a.tx_hash =b.tx_hash
WHERE action_name ilike 'DeployContract'
GROUP BY 1,2
ORDER BY 2 DESC
)
select count(DISTINCT smart_contract) as smart_contract, first_date from
first_tx
where first_date>=CURRENT_DATE -60
group by 2
order by smart_contract desc