0
I need that even when the search does not generate results, is displayed the value 0, 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;
and you want to tell what after all ? the ads or categories ?
– Rovann Linhalis
https://forum.imasters.com.br/topic/546600-union-com-com-com-com-mydata/ see if this helps
– Motta
I want the number ads by category.
– Daniel Neto