Ver originalSELECT autor, COUNT(autor ) totpages, SUM(IF(estado = 2, 1, 0)) validado, SUM(IF(estado = 3, 1, 0)) canceladoFROM navitoolWHERE estado = 2 OR estado = 3GROUP BY autor ORDER BY totpages DESCLIMIT 50