SG dataTPS query
    Updated 2024-06-20
    WITH
    tx_count AS (
    SELECT
    'ethereum' AS dataset,
    BLOCK_TIMESTAMP,
    FACT_TRANSACTIONS_ID
    FROM ethereum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= (CURRENT_DATE - INTERVAL '1 year')
    UNION ALL
    SELECT
    'polygon' AS dataset,
    BLOCK_TIMESTAMP,
    FACT_TRANSACTIONS_ID
    FROM polygon.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= (CURRENT_DATE - INTERVAL '1 year')
    UNION ALL
    SELECT
    'bsc' AS dataset,
    BLOCK_TIMESTAMP,
    FACT_TRANSACTIONS_ID
    FROM bsc.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= (CURRENT_DATE - INTERVAL '1 year')
    UNION ALL

    SELECT
    'arbitrum' AS dataset,
    BLOCK_TIMESTAMP,
    FACT_TRANSACTIONS_ID
    FROM arbitrum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= (CURRENT_DATE - INTERVAL '1 year')
    QueryRunArchived: QueryRun has been archived