Afonso_DiazTop projects
    Updated 2024-10-20
    with

    new_users as (
    select
    tx_signer as user,
    min(block_timestamp)::date as created_at
    from
    near.core.fact_transactions
    where
    tx_succeeded = 1
    group by 1
    having created_at >= current_date - interval '30 days'
    ),

    events as (
    select
    tx_hash,
    tx_signer as user,
    label_type,
    project_name
    from
    near.core.fact_actions_events_function_call
    join
    near.core.fact_transactions using(tx_hash)
    join
    near.core.dim_address_labels
    on
    address = receiver_id
    where
    user in (select distinct user from new_users)
    and label_type not in ('token', 'chadmin', 'operator')
    and label_subtype != 'token_contract'
    )

    select
    project_name,
    QueryRunArchived: QueryRun has been archived