0

我正在尝试构建一个使用 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 分开,我需要做些什么特别的事情吗?

4

0 回答 0