-- forked from Protocol succeed transactions vs failed transactions @ https://flipsidecrypto.xyz/edit/queries/a0aa3a8a-484e-410c-9b76-5810fb3090dc
(
SELECT 'Success' as status,
count (tx_hash) as "tx count"
FROM polygon.core.fact_transactions
WHERE to_address = '0x68bdee1bf95ad730f379a05eb8c51fb5dfa07748'
AND status = 'SUCCESS'
)
union all
(
SELECT 'Fail' as status,
count (tx_hash) as "tx count"
FROM polygon.core.fact_transactions
WHERE to_address = '0x68bdee1bf95ad730f379a05eb8c51fb5dfa07748'
AND status = 'FAIL'
)
union all
(
SELECT 'All' as status,
count (tx_hash) as "tx count"
FROM polygon.core.fact_transactions
WHERE to_address = '0x68bdee1bf95ad730f379a05eb8c51fb5dfa07748'
)