Medium · IPL cricket · Tables: matches
For each non-NULL venue with at least 30 matches whose result is 'runs' or 'wickets', count those decided_matches and those with result = 'wickets' as chase_wins. Compute 100.0 times chase_wins divided by decided_matches, rounded to two decimals. Treat stored venue strings separately. Return columns venue, decided_matches, chase_wins, chase_win_pct, in that order. Order by rounded chase_win_pct descending, then venue ascending. All source columns have TEXT affinity: cast numeric inputs before numeric comparisons or calculations. Counts and calculated numeric outputs must be numbers, not text.