I need that even when the search does not generate results, the value 0 is displayed, I tried with the following SQL search, but without success:
SELECT c.categoria as categoria,
CASE WHEN COUNT(c.categoria) IS NOT NULL THEN count(c.categoria) ELSE 0 END AS quantidade
FROM anuncio a
RIGHT JOIN categoria c ON a.categoria = c.categoria WHERE autorizado = '1'
GROUP BY c.categoria;