piperPolygon - Polygon Block Performance: Daily Number of Transactions
    Updated 2022-07-24
    /*
    Polygon - Polygon Block Performance

    What is the average time between blocks on Polygon?

    What was the maximum and minimum recorded time between two blocks?
    How many transactions are done in a block on average? How do these
    numbers compare to L1 such as Flow or Solana, or other L2 such as
    Arbitrum or Optimism?

    */

    WITH poly_all_blocks AS (
    SELECT
    block_timestamp::date AS date,
    count(tx_hash) AS number_of_tx
    FROM
    polygon.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-06-23' AND '2022-07-23'
    GROUP BY date
    ),

    eth_all_blocks AS (
    SELECT
    block_timestamp::date AS date,
    count(tx_hash) AS number_of_tx
    FROM
    ethereum.core.fact_transactions
    WHERE
    block_timestamp BETWEEN '2022-06-23' AND '2022-07-23'
    GROUP BY date
    ),
    solana_all_blocks AS (
    SELECT
    Run a query to Download Data