Communities for your favorite technologies. Explore all Collectives
Stack Overflow for Teams is now called Stack Internal. Bring the best of human thought and AI automation together at your work.
Bring the best of human thought and AI automation together at your work. Learn more
Find centralized, trusted content and collaborate around the technologies you use most.
Stack Internal
Knowledge at work
Bring the best of human thought and AI automation together at your work.
You can use aggregation:
select name, count(*), sum(error) as error, sum(success1 - error) as success from attempts group by name;
If you want the success rate, you can use:
avg( 1.0 - error ) as success_rate
select name, count(*), sum(error) as error, sum(success) as success from attempts group by name;
select name, count(*), sum(error) as error, sum(1 - error) as success from attempts group by name;
select name, contcount(*), sum(error) as error, sum(success) as success from attempts group by name;
select name, cont(*), sum(error) as error, sum(success) as success from attempts group by name;