我正在尝试构建一个使用JOIN和GROUP BY的查询,如下所示:
select r.id,r.[full name],r.[start date],min(work_date)
from
(resource r
left join
resourceVendorHistory rvh
on
r.id=rvh.resourceid)
left join
resource_activities ra
on
r.id=ra.resourceid
group by r.id,r.[full name],r.[start date]
where
rvh.resourceid is null
and
ra.id is not null
order by
ra.work_date asc
我收到了一个错误:
Syntax error (missing operator) in query expression 'r.[start date] where rvh.resourceid is null and ra.id is not null'.
我需要做些什么特别的事情才能将第二个JOIN与GROUP BY分开?