FatemeTheLadySolana- Transactions per minute
    Updated 2022-06-04
    with t as (select
    date_trunc('MINUTE',BLOCK_TIMESTAMP ) as min,
    count(distinct TX_ID) as num_total
    from flipside_prod_db.solana.fact_transactions
    where BLOCK_TIMESTAMP::date >='2022-05-09' and BLOCK_TIMESTAMP::date <='2022-06-03'
    group by 1
    order by 1 asc),
    s as(select
    date_trunc('MINUTE',BLOCK_TIMESTAMP ) as min,
    count(distinct TX_ID) as num_success
    from flipside_prod_db.solana.fact_transactions
    where BLOCK_TIMESTAMP::date >='2022-05-09' and BLOCK_TIMESTAMP::date <='2022-06-03' and SUCCEEDED='1'
    group by 1
    order by 1 asc),
    f as (select
    date_trunc('MINUTE',BLOCK_TIMESTAMP ) as min,
    count(distinct TX_ID) as num_failed
    from flipside_prod_db.solana.fact_transactions
    where BLOCK_TIMESTAMP::date >='2022-05-09' and BLOCK_TIMESTAMP::date <='2022-06-03' and SUCCEEDED='0'
    group by 1
    order by 1 asc)
    select
    date_trunc('day',t.min) as day,
    Avg(num_total) as Total_Avg,
    Avg(num_success) as success_Avg,
    Avg(num_failed) as failed_Avg
    from t left join s on t.min=s.min
    left join f on t.min=f.min
    group by 1 order by 1 asc
    Run a query to Download Data