mz0111hubble 2
    Updated 2022-10-10
    --credit to alik110
    with table1 as (
    select signers[0] as user,
    min (block_timestamp) as mindate
    from solana.core.fact_transactions
    where instructions[0]:programId = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    and succeeded = 'TRUE'
    group by 1),

    table2 as (
    select mindate::date as day,
    count (distinct user) as New_Users,
    sum (new_users) over (order by day) as Total_New_Users
    from TABLE1
    group by 1)

    select block_timestamp::date as date,
    new_users,
    total_new_users,
    count (distinct tx_id) as TX_Count,
    count (distinct signers[0]) as Users_Count,
    sum (tx_count) over (order by date) as Cumulative_TX_Count
    from solana.core.fact_transactions t1 join table2 t2 on t1.block_timestamp::date = t2.day
    where instructions[0]:programId = 'HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    and succeeded = 'TRUE'
    group by 1,2,3
    order by 1
    Run a query to Download Data