I have a table where I have responsibility for incidents. I want to remove all those responsible with all the incidents of each one, but also those who do not have.
Table:
RESPONSABLES TIPO
Example with query results (I want responsible with request incidents):
Primer_responsable 2
Segundo_responsable 0
Tercer_responsable 10
Cuarto_responsable 5
I'll be clearer:
Each incident can be of four types: request, error, sub-task or incident.
And the people in charge are different people.
Attempt:
SELECT Responsable,COUNT(*)
FROM v_Reporte
WHERE 'Tipo de Incidencia' LIKE '%Peticion%'
GROUP BY Responsable;
But I do not get those that have no incidence of request with value 0.
I add an example, to make it even clearer: link