SELECT COUNT (DISTINCT (TX_HASH)) AS deployed_contracts, date_trunc('day', block_timestamp) as daily
FROM (
SELECT *
FROM near.core.fact_transactions
where TX LIKE '%DeployContract%'
)
WHERE TX NOT LIKE '%"status":{"Failure"%'
AND BLOCK_TIMESTAMP BETWEEN '2022-01-01' AND '2022-07-31'
GROUP BY daily