Ver originalSET @MAX = (SELECT MAX(x) FROM (SELECT NumeroEmpleado, COUNT(1) x FROM Limpieza GROUP BY NumeroEmpleado) T)