Success rate by payment method (ClickHouse)
Success rate by payment method (ClickHouse)
In payments, for each method compute the total number of transactions total = count(), the number of successful ones successes = rows with status = 'success', and success_rate = successes / total rounded to 4 decimals. The denominator count() is always > 0 inside a group. Use countIf. Order by method. Columns: method, total, successes, success_rate.
Row order matters
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid