LittlerDataactividad en programas true
    Updated 2022-07-07
    With SucTrue as (
    Select
    date_trunc('day',block_timestamp) as daydate,
    COUNT (DISTINCT program_id) as SuccessOnly
    From solana.core.fact_events
    where block_timestamp between '2022-01-01' and '2022-07-05' and succeeded = 'true'
    group by 1),

    WSuc as (
    Select
    date_trunc('day',block_timestamp) as day2,
    COUNT (DISTINCT program_id) as TotalCount
    From solana.core.fact_events
    where block_timestamp between '2022-01-01' and '2022-07-05'
    group by 1)

    SELECT
    SucTrue.daydate,
    SucTrue.SuccessOnly,
    WSuc.TotalCount
    FROM SucTrue JOIN WSuc ON SucTrue.daydate=WSuc.day2
    GROUP BY 1,2,3

    --table provided by popex404
    Run a query to Download Data