SG datamonthly gas fee
    Updated 2024-06-06
    WITH
    tx_fees AS (
    SELECT
    'ethereum' AS dataset,
    tx_fee
    FROM ethereum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1 MONTH'
    UNION ALL
    SELECT
    'polygon' AS dataset,
    tx_fee
    FROM polygon.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1 MONTH'
    UNION ALL
    SELECT
    'bsc' AS dataset,
    tx_fee
    FROM bsc.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1 MONTH'
    UNION ALL
    SELECT
    'arbitrum' AS dataset,
    tx_fee
    FROM arbitrum.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1 MONTH'
    UNION ALL
    SELECT
    'optimism' AS dataset,
    tx_fee
    FROM optimism.core.fact_transactions
    WHERE BLOCK_TIMESTAMP >= DATE_TRUNC('month', CURRENT_DATE) - INTERVAL '1 MONTH'
    UNION ALL
    SELECT
    'base' AS dataset,
    tx_fee
    FROM base.core.fact_transactions
    QueryRunArchived: QueryRun has been archived