Query editor
with program_n_success as (selectixns.program_id, successfrom solana.transactions as txncross join unnest(instructions) as ixns(data, program_id, args, inner_ixns)where txn.block_time >= now() - interval '1' dayand ixns.program_id not in ('11111111111111111111111111111111' -- System Program, 'TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA' -- Token Program, 'So11111111111111111111111111111111111111112' -- Wrapped SOL, 'ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL' -- Associated Token Account Program, 'ComputeBudget111111111111111111111111111111' -- set the compute unit limit and compute unit price)), high_fail_programs as (selectprogram_id, total_txns, total_succ_txns, cast(total_succ_txns as double) / total_txns as success_ratefrom (selectprogram_id, count(success) as total_txns, count(success) filter (where success) as total_succ_txnsfrom program_n_successgroup by 1)where total_txns >= 100000and cast(total_succ_txns as double) / total_txns < 0.5 -- only care about those high fail rate), program_names as (select distinct namespace,program_name,program_idfrom solana.discriminators)selecthfp.program_id, pn.namespace || ': ' || pn.program_name as program_name, get_href(get_chain_explorer_address('solana', hfp.program_id), coalesce(pn.program_name,'link')) as link, hfp.total_txns, hfp.total_succ_txns, hfp.success_ratefrom high_fail_programs hfpleft join program_names pnon hfp.program_id = pn.program_idorder by success_rate