Asi?
Código SQL:
Ver originalDECLARE @MAX INT
SET @MAX = (SELECT MAX(COUNT(1)) FROM Limpieza GROUP BY NumeroEmpleado)
UPDATE Empleados
SET Salario = Salario * 1.2
FROM Empleados E
INNER JOIN (
SELECT NumeroEmpleado, COUNT(1) TotalHabit
FROM Limpieza
GROUP BY NumeroEmpleado
HAVING COUNT(1) = @MAX
) T ON E.Id = T.NumeroEmpleado