SELECT date(BLOCK_TIMESTAMP) as date, COUNT(DISTINCT TX_HASH) as tx_count,
COUNT(DISTINCT FROM_ADDRESS) as wallets,
case when date>= '2022-07-01' then 'July' else 'Before July' end as sep
FROM polygon.core.fact_transactions
WHERE date(BLOCK_TIMESTAMP) >= '2022-01-01'
GROUP by date