O SQL Server requer subconsultas que você
SELECT FROM
ou JOIN
ter um pseudônimo. Adicione um alias à sua subconsulta (neste caso
x
):select COUNT(*) from
(
select m.Company_id
from Monitor as m
inner join Monitor_Request as mr on mr.Company_ID=m.Company_id
group by m.Company_id
having COUNT(m.Monitor_id)>=5) x