SELECT COUNT(DISTINCT TX_HASH) AS "Total transactions",
COUNT(DISTINCT CASE WHEN STATUS = 'SUCCESS' THEN TX_HASH END) AS "Successful transactions",
COUNT(DISTINCT CASE WHEN STATUS = 'FAIL' THEN TX_HASH END) AS "Failed transactions",
FROM base.core.fact_transactions
WHERE 1=1
AND BLOCK_TIMESTAMP >= '2024-01-01' AND
BLOCK_TIMESTAMP<='2024-06-30'