Sandeshxmetric new users
    Updated 2023-02-16
    -- amount_usd -> amount itself

    with xmetrics_out AS

    (
    select
    block_timestamp,
    tx_hash,
    raw_amount/pow(10,18) as amount_usd,
    from_address,
    to_address
    from
    polygon.core.fact_token_transfers
    where contract_address=lower('0x15848C9672e99be386807b9101f83A16EB017bb5')
    ),
    temp as
    (
    select to_address, min(block_timestamp) as first_txn_time
    from xmetrics_out
    group by to_address
    )
    select date_trunc('month',first_txn_time) as "month", count(distinct to_address) as new_users from temp
    group by "month"
    Run a query to Download Data