dariustay_0512Arbitrum and BSC transaction fees
    Updated 2022-07-03
    WITH arbitrum_tx_fees AS(
    SELECT
    date(block_timestamp) AS date,
    avg(tx_fee) AS avg_tx_fee_eth
    FROM arbitrum.core.fact_transactions
    WHERE status = 'SUCCESS'
    GROUP BY 1
    ),

    bsc_tx_fees AS(
    SELECT
    date(block_timestamp) AS date,
    avg(tx_fee) AS avg_tx_fee_eth
    FROM bsc.core.fact_transactions
    WHERE status = 'SUCCESS'
    GROUP BY 1
    )

    SELECT
    a.date AS "Date",
    a.avg_tx_fee_eth AS "Arbitrum",
    b.avg_tx_fee_eth AS "BSC"
    FROM arbitrum_tx_fees a
    JOIN bsc_tx_fees b ON a.date = b.date
    WHERE a.date >= dateadd(DAY, -30, getdate())
    GROUP BY 1, 2, 3
    ORDER BY 1 DESC;
    Run a query to Download Data