I have a db that in one column have 5 possible values: "Fechado", "Aberto", "Em Despiste", "Cancelado", "Resolvido".
And im trying to do a query that counts the values to a json file
var data = "SELECT COUNT (*) FROM graficos WHERE ESTADO='FECHADO'";
I've tried this and it gives me [{"":189}]
. How can i get the count of the other values ?
I think that this is a simple question but i can't reach it...It is possible to have the count of the other values on the same query ?