SELECT
DATE_TRUNC('DAY',BLOCK_TIMESTAMP)::DATE AS DAY,
COUNT(DISTINCT TX_HASH) AS NUMBER_OF_TRANSACTIONS,
COUNT(DISTINCT FROM_ADDRESS) AS NUMBER_OF_UNIQUE_ADDRESSES
FROM polygon.core.fact_transactions
WHERE BLOCK_TIMESTAMP>='2022-07-01' --since July
AND STATUS='SUCCESS'
GROUP BY DAY
ORDER BY DAY