piperA vs B: Total Number of Transactions (last 7 days)
    Updated 2022-06-30
    /*
    Twitter: @der_piper
    Discrod: piper#6707

    A vs B

    Compare transaction volume for BSC vs. Arbitrum over the past 7 days and create a simple
    visualization to display both. Highlight any interesting points of comparison that you see.
    */

    WITH number_of_bnb_tx AS (
    SELECT
    COUNT(tx_hash) as number_of_transactions
    FROM
    bsc.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-06-23' AND '2022-06-30'
    ),
    number_of_arb_tx AS (
    SELECT
    COUNT(tx_hash) as number_of_transactions
    FROM
    arbitrum.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-06-23' AND '2022-06-30'
    )

    SELECT
    MAX(block_timestamp)::date AS date,
    (SELECT number_of_transactions FROM number_of_bnb_tx) AS BSC,
    (SELECT number_of_transactions FROM number_of_arb_tx) AS Arbitrum
    FROM
    bsc.core.fact_transactions
    Run a query to Download Data