0xHaM-dDaily and new users
    Updated 2022-10-09
    with new_users as (
    select
    min(block_timestamp::date) as min_date,
    signers[0] as users
    from solana.core.fact_transactions
    where instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    GROUP by 2
    )

    select
    date_trunc('{{Interval}}', block_timestamp)::date as date,
    'Daily Active Users' as status,
    count(distinct signers[0]) as users
    from solana.core.fact_transactions
    where instructions[0]:programId='HubbLeXBb7qyLHt3x7gvYaRrxQmmgExb7fCJgDqFuB6T'
    group by 1,2

    UNION ALL
    select
    date_trunc('{{Interval}}', min_date)::date as date,
    'New Active Users' as status,
    count(users) as new_users
    from new_users
    group by 1,2

    UNION

    select
    date_trunc('{{Interval}}', block_timestamp)::date as date,
    'Kamino Active Users' as status,
    count (distinct signers[0]) as Users_Count
    from solana.core.fact_transactions
    where succeeded = 'TRUE'
    and instructions[0]:programId = '6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc'
    group by 1
    Run a query to Download Data