There are multiple ways to get the right value for fail. Some examples:
→ aaronparecki.com/2022/09/16/6/sql
There are multiple ways to get the right value for fail. Some examples:
SUM(success = 0) as fail SUM(1-success) as fail COUNT(*)-SUM(success) as fail