Overall payment-success summary (ClickHouse)
Overall payment-success summary (ClickHouse)
Over the whole payments table, return a single row with: total = count(), successes = rows with status = 'success', success_revenue = sum of amount over successful rows, and success_rate = successes / total rounded to 4 decimals. The whole-table count() denominator is always > 0. Columns: total, successes, success_revenue, success_rate.
Expected output sample
| total | successes | success_revenue | success_rate |
|---|---|---|---|
| 9 | 6 | 1010.00 | 0.6667 |
Sign in to see submission history
Sign inSign in to use AI Mentor
Sign inFocus radio
Paused · SomaFM · Fluid