select trunc(block_timestamp,'day') as date ,
count(DISTINCT tx_receiver) as contract,
count(DISTINCT TX_HASH) as transactions
from near.core.fact_transactions
where TX_HASH in ( select tx_hash
from near.core.fact_actions_events
where action_name = 'DeployContract' )
group by 1