Updated 2025-02-19
    WITH transaction_base AS (
    SELECT
    tx.tx_hash,
    tx.block_timestamp,
    tx.from_address,
    tx.to_address,
    tx.tx_succeeded,
    CASE WHEN c_from.address IS NULL THEN tx.from_address END AS eoa_sender,
    CASE WHEN c_to.address IS NULL THEN tx.to_address END AS eoa_receiver
    FROM
    monad.testnet.fact_transactions tx
    LEFT JOIN (SELECT DISTINCT address FROM monad.testnet.dim_contracts) c_from
    ON tx.from_address = c_from.address
    LEFT JOIN (SELECT DISTINCT address FROM monad.testnet.dim_contracts) c_to
    ON tx.to_address = c_to.address
    WHERE
    tx.block_timestamp >= '2025-02-19' -- Ensures we only get data from today onwards
    )
    SELECT
    COUNT(DISTINCT tx_hash) AS total_transactions,
    COUNT(DISTINCT CASE WHEN tx_succeeded = true THEN tx_hash END) AS successful_transactions,
    COUNT(DISTINCT CASE WHEN tx_succeeded = false THEN tx_hash END) AS failed_transactions,
    COUNT(DISTINCT eoa_sender) AS unique_eoa_senders,
    COUNT(DISTINCT eoa_receiver) AS unique_eoa_receivers,
    COALESCE(ROUND(
    COUNT(CASE WHEN tx_succeeded = true THEN 1 END)::FLOAT
    / NULLIF(COUNT(*), 0) * 100, 2), 0) AS success_rate_percentage
    FROM transaction_base;

    Last run: 24 days ago
    TOTAL_TRANSACTIONS
    SUCCESSFUL_TRANSACTIONS
    FAILED_TRANSACTIONS
    UNIQUE_EOA_SENDERS
    UNIQUE_EOA_RECEIVERS
    SUCCESS_RATE_PERCENTAGE
    1
    1014266993720204821123278471397.97
    1
    43B
    3s