SQL Server kræver underforespørgsler, som du SELECT FROM
eller JOIN
at have et alias.
Tilføj et alias til din underforespørgsel (i dette tilfælde 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