messarisolana_new_programs
    Updated 2024-01-02
    -- forked from solana_new_fee_payers @ https://flipsidecrypto.xyz/edit/queries/3fc16e35-b69c-4875-8d05-6b08ab45ed87

    select
    first_date as date,
    count(programs) as new_programs
    from (
    select
    min(concat(year(to_timestamp(block_timestamp)),'-Q',quarter(to_timestamp(block_timestamp)))) as first_date,
    program_id as programs
    from solana.core.fact_events
    WHERE succeeded
    group by 2)
    group by date
    having date is not null
    order by date desc

    select
    concat(year(to_timestamp(block_timestamp)),'-Q',quarter(to_timestamp(block_timestamp))) as quarter,
    count(distinct program_id) as programs
    from solana.core.fact_events
    WHERE succeeded
    and date(block_timestamp) >= '2023-04-01'
    group by 1
    order by 1 desc


    QueryRunArchived: QueryRun has been archived