brian-terraNEAR - MAU copy
    Updated 2023-10-31
    WITH txns as (
    select distinct tx_hash
    from near.core.fact_transactions
    where tx_receiver IN ('2023.nearcontickets.near','product_2023.nearcontickets.near')
    OR tx_signer IN ('2023.nearcontickets.near','product_2023.nearcontickets.near')
    ),
    owners as (
    select distinct owner_id
    from near.core.fact_nft_mints a, txns b
    where a.tx_hash = b.tx_hash
    )

    SELECT
    date_trunc( 'month' , a.block_timestamp ) AS "date"
    , count( DISTINCT a.tx_signer ) AS "active users"
    , sum( "active users" ) over ( ORDER BY "date" ASC ) AS "total active users"
    FROM
    near.core.fact_transactions a,
    near.core.dim_address_labels b
    WHERE
    b.project_name IS NOT NULL
    and a.tx_receiver = b.address (+)
    AND a.tx_signer != a.tx_receiver
    AND "date" >= '2023-01-01'
    AND "date" < '2023-10-01'
    GROUP BY 1
    ORDER BY 1 DESC



    Run a query to Download Data