SalehNetwork Performance Dashboard-success rates-daily
    Updated 2022-07-09
    with lst_last_month as (
    select
    date_trunc(day,block_timestamp)::date as date
    ,count(tx_id) as tx_count
    ,div0(count( DISTINCT iff(SUCCEEDED,tx_id,null)),count( DISTINCT iff(SUCCEEDED,null,tx_id))) as success_rates
    from solana.core.fact_transactions
    where block_timestamp::date>=CURRENT_DATE-30
    -- and SUCCEEDED=true
    group by 1
    order by 1
    )
    , lst_before_month as (
    select
    date_trunc(day,block_timestamp)::date as date
    ,count(tx_id) as tx_count
    ,div0(count( DISTINCT iff(SUCCEEDED,tx_id,null)),count( DISTINCT iff(SUCCEEDED,null,tx_id))) as success_rates
    from solana.core.fact_transactions
    where block_timestamp::date>='2022-04-01' and block_timestamp::date<CURRENT_DATE-30
    -- and SUCCEEDED=true
    group by 1
    order by 1
    )
    select 'Before' as type,* from lst_before_month
    union all
    select 'After' as type,* from lst_last_month
    Run a query to Download Data