0xHaM-dGeneral
    Updated 2023-05-20
    with firstTx as (
    select
    signers[0] as usr,
    min(block_timestamp) as min_date
    from solana.core.fact_events
    where program_id = 'GUhB2ohrfqWspztgCrQpAmeVFBWmnWYhPcZuwY52WWRe'
    group by 1
    )
    select
    date_trunc('{{Time_Interval}}',block_timestamp) as date,
    count(DISTINCT tx_id) as tx_cnt,
    count(DISTINCT signers[0]) as users,
    count(DISTINCT usr) as new_users,
    sum(tx_cnt) over (order by date) as cum_tx_cnt,
    sum(new_users) over (order by date) as cum_new_users
    from solana.core.fact_events LEFT join firstTx on block_timestamp::date = min_date::date
    where succeeded
    and program_id = 'GUhB2ohrfqWspztgCrQpAmeVFBWmnWYhPcZuwY52WWRe'
    and date >= '2022-10-01'
    group by 1
    ORDER by 1

    Run a query to Download Data