I have a query in which I count the rows grouped by a type code varchar should count 1 but count the 3, you could see that it is wrong
the grouped column is ID_CURSO_UNICO
SELECT count(ID_CURSO_UNICO) as cantidad from encuesta_apl where
YEAR(fecha)=? and ID_ENCUESTA=? group by ID_CURSO_UNICO