StangFAST1 - NEAR - New Trader
    Updated 2023-03-03
    with neth AS
    (
    SELECT
    t.tx_signer AS trader
    , min( t.block_timestamp ) AS min_date

    FROM
    near.core.fact_transactions t

    WHERE
    t.block_timestamp >= '2022-12-19'
    AND t.block_timestamp < current_date
    AND t.tx_receiver = 'nethmap.near'

    GROUP BY
    trader

    )

    SELECT
    min_date::date AS date
    , count( DISTINCT trader ) AS new_trader
    , sum( new_trader ) over ( ORDER BY date ASC ) AS cumu_new_trader

    FROM
    near.core.fact_transactions e

    INNER JOIN
    neth
    ON
    e.tx_signer = neth.trader

    GROUP BY
    1
    ORDER BY
    Run a query to Download Data