I need a query to get the number of errors and hits from this table.
Something like that:
SELECT t.acertou,
COUNT(1)
FROM tabela t
GROUP BY t.acertou
If you wanted to show as just a record, you can use subquery
:
SELECT (SELECT COUNT(1)
FROM tabela t
WHERE t.acertou) AS acertos,
(SELECT COUNT(1)
FROM tabela t
WHERE NOT t.acertou) AS erros