2844NEWCOMERS-NFT
    Updated 2022-07-14
    with t1 as(select
    date_trunc('day', first_transaction) as "DATE",
    count (distinct USERS) as New_Users_POLYGON
    from (
    select
    distinct FROM_ADDRESS as USERS,
    min(block_timestamp) as First_transaction
    from flipside_prod_db.polygon.transactions
    WHERE block_timestamp >= '2022-01-01'
    group by 1
    )
    where "DATE" > '2022-01-01'
    group by 1),

    t2 as (select
    date_trunc('day', first_transaction) as "DATE",
    count (distinct USERS) as New_Users_NFT
    from (
    select
    distinct TO_ADDRESS as USERS,
    min(block_timestamp) as First_transaction
    from flipside_prod_db.polygon.udm_events
    WHERE block_timestamp >= '2022-01-01'
    AND TO_LABEL_TYPE='nft'
    group by 1
    )
    where "DATE" > '2022-01-01'
    group by 1)

    select t1."DATE" as "DATE",
    New_Users_POLYGON as "newcomers on POLYGON",
    New_Users_NFT as "newcomers on NFT",
    "newcomers on NFT"/"newcomers on POLYGON" AS "RATE OF NEWCOMERS"
    from t1 LEFT join t2 on t1."DATE"=t2."DATE"
    Run a query to Download Data