replied to a post on aaronparecki.com

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