iboo-jbj2MVSwap success rate:
    Updated 2022-03-16
    with success as ( select block_timestamp::date as date ,
    case when swap_program ilike '%jupiter%' then upper('jupiter')
    when swap_program ilike '%orca%' then upper('orca')
    end as protocol,
    count (tx_id) as success_transactions
    from solana.swaps
    where block_timestamp::date >= '2022-01-01'
    and succeeded = true
    group by 1,2 having protocol is not NULL order by 1
    ),
    failed as (
    select block_timestamp::date as date ,
    case when swap_program ilike '%jupiter%' then upper('jupiter')
    when swap_program ilike '%orca%' then upper('orca')
    end as protocol,
    count (tx_id) as failed_transactions
    from solana.swaps
    where block_timestamp::date >= '2022-01-01'
    and succeeded = false
    group by 1,2 having protocol is not NULL order by 1
    )
    select success.date as date ,
    success.protocol as protocol ,
    (success_transactions/(success_transactions +failed_transactions )) as success_rate
    from success join failed
    on success.date = failed.date
    Run a query to Download Data