mahdishUntitled Query
    Updated 2022-09-07
    with daily_new_users as (select
    first_transaction as date, "new user"
    from (select
    distinct tx_signer as "new user",
    min(block_timestamp) as first_transaction
    from near.core.fact_transactions
    where tx_status = 'Success'
    group by "new user" )
    having date >= current_date - 90),

    new_user_with_action as (select
    a.block_timestamp,
    a.tx_hash,
    tx_signer,
    action_name,
    method_name
    from near.core.fact_transactions a
    join near.core.fact_actions_events_function_call b on
    a.tx_hash = b.tx_hash
    where tx_signer in (select "new user" from daily_new_users))

    select
    distinct method_name as action,
    count(distinct tx_hash) as trnasactions
    from new_user_with_action
    where block_timestamp::date >= current_date - 90
    group by 1
    order by 2 desc
    limit 20
    Run a query to Download Data