Модификация последнего ответа, я предпочитаю использовать IN statment
<code>
DECLARE @xMonth INT
SET @xMonth = 3</p>
<p>SELECT TOP 1 ID
FROM Employee
WHERE ID NOT IN (SELECT EmployeeID
FROM EmployeeOfTheMonth
WHERE DATEADD(m, -@xMonth, GETDATE()) < MonthEndedDate)
ORDER BY NEWID()