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.
A ordem das linhas importa
Entre para ver seu histórico de envios
EntrarEntre para usar o AI Mentor
EntrarFocus radio
Paused · SomaFM · Fluid