arctic-night-foxPolygon's Average New Addresses per Day
    Updated 2022-08-02
    -- Q2. Draw a chart showing the number of new addresses every day on polygon(matic) network.
    -- New addressses are unique addresses that appeared for the first time in a transaction of Matic.

    with new_poly_2020 as (
    select from_address as address , min(block_timestamp)::date as min_date, '2020' as type
    from flipside_prod_db.polygon.transactions
    group by address
    having min_date <= '2020-12-31' and min_date >= '2020-01-01'
    ) , new_poly_2021 as (
    select from_address as address , min(block_timestamp)::date as min_date, '2021' as type
    from flipside_prod_db.polygon.transactions
    group by address
    having min_date <= '2021-12-31' and min_date >= '2021-01-01'
    ) , new_poly_2022 as (
    select from_address as address , min(block_timestamp)::date as min_date, '2022' as type
    from flipside_prod_db.polygon.transactions
    group by address
    having min_date >= '2022-01-01' and min_date <= '2022-05-29'
    )
    select count(address)/365 as new_address, type
    from new_poly_2020 group by type
    UNION
    select count(address)/365 as new_address, type
    from new_poly_2021 group by type
    UNION
    select count(address)/datediff(day, '2022-01-01', '2022-05-29') as new_address, type
    from new_poly_2022 group by type
    Run a query to Download Data